Project: bml_lib

License: BSD

Dependencies:

Used by:

All Packages

edu::wpi::hri::log::SubLogger Class Reference

Inheritance diagram for edu::wpi::hri::log::SubLogger:

List of all members.

Public Member Functions

void debug (LoggerLevel level, String str)
void error (String str)
void fatal (String str, int exitCode)
void info (String str)
void warn (String str)

Package Functions

 SubLogger (Logger log, Colors color, String name)

Private Attributes

final Logger superLogger

Detailed Description

The SubLogger class can only log to another Logger. This is used for displaying nested messages from objects inside of objects so that the hierarchy can be clearly seen. This is based on the Decorator Pattern.

Author:
Aaron Holroyd (aholroyd (at) wpi (dot) edu)

Definition at line 44 of file SubLogger.java.


Constructor & Destructor Documentation

edu::wpi::hri::log::SubLogger::SubLogger ( Logger  log,
Colors  color,
String  name 
) [inline, package]

Create a new SubLogger which logs to the specified Logger and prepends the given name in the given Color to all of the messages.

Parameters:
log The Logger to send the messages to.
color The color to show the name in.
name The name to prepend to the messages.

Definition at line 59 of file SubLogger.java.


Member Function Documentation

void edu::wpi::hri::log::SubLogger::debug ( LoggerLevel  level,
String  str 
) [inline, virtual]

Print a debug string to the user so long as the user wants to see debugging.

Parameters:
level The minimum level required to print this message.
str The message to tell the user

Implements edu::wpi::hri::log::Logger.

Definition at line 65 of file SubLogger.java.

void edu::wpi::hri::log::SubLogger::error ( String  str  )  [inline, virtual]

Print an error string to the user so long as the user wants to see errors.

Parameters:
str The message to tell the user

Implements edu::wpi::hri::log::Logger.

Definition at line 80 of file SubLogger.java.

void edu::wpi::hri::log::SubLogger::fatal ( String  str,
int  exitCode 
) [inline, virtual]

Print a fatal string to the user and then exit the program. The specified exit code will be used when calling the System.exit() routine.

Parameters:
str The message to tell the user
exitCode The exit code for why the program had to stop

Implements edu::wpi::hri::log::Logger.

Definition at line 85 of file SubLogger.java.

void edu::wpi::hri::log::SubLogger::info ( String  str  )  [inline, virtual]

Print an info string to the user so long as the user wants to see information.

Parameters:
str The message to tell the user

Implements edu::wpi::hri::log::Logger.

Definition at line 70 of file SubLogger.java.

void edu::wpi::hri::log::SubLogger::warn ( String  str  )  [inline, virtual]

Print a warning string to the user so long as the user wants to see warning messages.

Parameters:
str The message to tell the user

Implements edu::wpi::hri::log::Logger.

Definition at line 75 of file SubLogger.java.


Member Data Documentation

Definition at line 46 of file SubLogger.java.


The documentation for this class was generated from the following file:

bml_lib
Author(s): Aaron Holroyd (aholroyd (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:44:08 2011