Project: bml_lib

License: BSD

Dependencies:

Used by:

All Packages

edu::wpi::hri::log::SystemLogger Class Reference

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

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

 SystemLogger (LoggerLevel level, Colors color, String name)

Private Member Functions

void print (String pre, String str)

Static Private Attributes

static final String DEBUG_STR
static final String ERROR_STR
static final String FATAL_STR
static final String INFO_STR
static final String WARN_STR

Detailed Description

Log messages via the Standard out routines. No exceptions can be thrown except for the Exceptions which the System can throw.

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

Definition at line 43 of file SystemLogger.java.


Constructor & Destructor Documentation

edu::wpi::hri::log::SystemLogger::SystemLogger ( LoggerLevel  level,
Colors  color,
String  name 
) [inline, package]

Create a new SystemLogger which always prints the given name in the specified color before printing any message given.

Parameters:
level The maximum level for debugging information
color The color of the name to display
name The name of where the message came from.

Definition at line 67 of file SystemLogger.java.


Member Function Documentation

void edu::wpi::hri::log::SystemLogger::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 76 of file SystemLogger.java.

void edu::wpi::hri::log::SystemLogger::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 92 of file SystemLogger.java.

void edu::wpi::hri::log::SystemLogger::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 97 of file SystemLogger.java.

void edu::wpi::hri::log::SystemLogger::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 82 of file SystemLogger.java.

void edu::wpi::hri::log::SystemLogger::print ( String  pre,
String  str 
) [inline, private]

Definition at line 71 of file SystemLogger.java.

void edu::wpi::hri::log::SystemLogger::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 87 of file SystemLogger.java.


Member Data Documentation

final String edu::wpi::hri::log::SystemLogger::DEBUG_STR [static, private]
Initial value:
 Colors.GREEN_FG.bashColor
        + "[DEBUG] "

Definition at line 45 of file SystemLogger.java.

final String edu::wpi::hri::log::SystemLogger::ERROR_STR [static, private]
Initial value:
 Colors.RED_FG.bashColor
        + "[ERROR] "

Definition at line 51 of file SystemLogger.java.

final String edu::wpi::hri::log::SystemLogger::FATAL_STR [static, private]
Initial value:
 Colors.RED_FG.bashColor
        + "[FATAL] "

Definition at line 53 of file SystemLogger.java.

final String edu::wpi::hri::log::SystemLogger::INFO_STR [static, private]
Initial value:
 Colors.DEFAULT.bashColor
        + "[ INFO] "

Definition at line 47 of file SystemLogger.java.

final String edu::wpi::hri::log::SystemLogger::WARN_STR [static, private]
Initial value:
 Colors.YELLOW_FG.bashColor
        + "[ WARN] "

Definition at line 49 of file SystemLogger.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