Project: bml_lib
License: BSD
Dependencies:
Used by:
All Packages
|
edu::wpi::hri::log::Logger Class Reference
List of all members.
Public Types |
enum | Colors {
DEFAULT = ("\033[0m"),
RED_FG = ("\033[31m"),
GREEN_FG = ("\033[32m"),
YELLOW_FG = ("\033[33m"),
BLUE_FG = ("\033[34m"),
MAGENTA_FG = ("\033[35m"),
CYAN_FG = ("\033[36m"),
RED_BG = ("\033[41m"),
GREEN_BG = ("\033[42m"),
YELLOW_BG = ("\033[43m"),
BLUE_BG = ("\033[44m"),
MAGENTA_BG = ("\033[45m"),
CYAN_BG = ("\033[46m"),
GENER = (GREEN_FG.bashColor),
SPINNER = (BLUE_FG.bashColor),
EXEC_TURN_FRAG = (GREEN_FG.bashColor),
BML = (RED_FG.bashColor),
XML = (YELLOW_FG.bashColor),
POLICY = (MAGENTA_FG.bashColor),
GAZE_KNOWLEDGE = (DEFAULT.bashColor + BLUE_BG.bashColor),
REFERENCE = (DEFAULT.bashColor + MAGENTA_BG.bashColor),
SITUATION_KNOWLEDGE = (DEFAULT.bashColor + RED_BG.bashColor),
REALIZER = (BLUE_FG.bashColor),
BEHAVIOR = (RED_FG.bashColor),
BEHAV_LIST = (YELLOW_FG.bashColor),
EXECUTOR = (GREEN_FG.bashColor),
CONTROL = (CYAN_FG.bashColor),
SCHEDULE = (MAGENTA_FG.bashColor),
PETRI_NET = (DEFAULT.bashColor)
} |
enum | LoggerLevel {
ALWAYS = (0),
INIT = (10),
POLICY_EXECUTION = (20),
BML_EXECUTION = (30),
BEHAVIOR = (40),
SCHEDULE = (50),
MATH = (60),
IO = (70),
MASTER = (80),
ALL = (Integer.MAX_VALUE)
} |
Public Member Functions |
abstract void | debug (LoggerLevel level, String str) |
abstract void | error (String str) |
abstract void | fatal (String str, int exitCode) |
abstract void | info (String str) |
void | printThrowable (LoggerLevel level, Throwable e) |
final Logger | sub (Colors color, String name) |
abstract void | warn (String str) |
Static Public Member Functions |
static Logger | createBase (LoggerLevel maxLevel, String type, Colors color, String name) |
static Logger | createDefault () |
Protected Member Functions |
final String | concat (Colors color, String str) |
| Logger (LoggerLevel level, Colors color, String name) |
Protected Attributes |
final LoggerLevel | maxLevel |
Private Attributes |
final String | prefix |
Static Private Attributes |
static int | count = 0 |
Detailed Description
The Logger abstract class is used for both debugging purposes and to tell the user about what the program is doing. The known subclasses are for logging in an ROS or standard out fashion.
- Author:
- Aaron Holroyd (aholroyd (at) wpi (dot) edu)
Definition at line 46 of file Logger.java.
Member Enumeration Documentation
The Colors Enumeration is used to show text in varying colors.
- Author:
- Aaron Holroyd (aholroyd (at) wpi (dot) edu)
- Enumerator:
DEFAULT |
Display Bash text in the default color, no background is specified
|
RED_FG |
Display Bash text in red, no background is specified
|
GREEN_FG |
Display Bash text in greed, no background is specified
|
YELLOW_FG |
Display Bash text in yellow, no background is specified
|
BLUE_FG |
Display Bash text in blue, no background is specified
|
MAGENTA_FG |
Display Bash text in magenta, no background is specified
|
CYAN_FG |
Display Bash text in cyan, no background is specified
|
RED_BG |
Display Bash text in red, no background is specified
|
GREEN_BG |
Display Bash text in greed, no background is specified
|
YELLOW_BG |
Display Bash text in yellow, no background is specified
|
BLUE_BG |
Display Bash text in blue, no background is specified
|
MAGENTA_BG |
Display Bash text in magenta, no background is specified
|
CYAN_BG |
Display Bash text in cyan, no background is specified
|
GENER |
The color to use for the default Generation level
|
SPINNER |
The color to use for the MasterSpinner and other spinning items
|
EXEC_TURN_FRAG |
The color to use for the Compound Communicative Actions
|
BML |
The color to use for BML objects (realizer etc.)
|
XML |
The color to use for printing xml informaion
|
POLICY |
The color to print rule information in
|
GAZE_KNOWLEDGE |
The color to print gaze knowledge informtion in
|
REFERENCE |
The color to print everything related to references in
|
SITUATION_KNOWLEDGE |
The color to print sitation specific knowledge in
|
REALIZER |
The color to use for the base of the realizer node
|
BEHAVIOR |
The color to display all of the behaviors in
|
BEHAV_LIST |
The color to use for the list in the realizer node
|
EXECUTOR |
The color to use for the executors in the realizer node
|
CONTROL |
The color to use when communicating with control
|
SCHEDULE |
The color to use when scheduling and executing schedules
|
PETRI_NET |
The color to use when printing for a petri net
|
Definition at line 179 of file Logger.java.
This enumeration is used for specifying the maximum debug output via the Loggers. Each value has a numerical level associated with it which must be lower than the logger level specified at runtime in order for the Logger to show the user the information.
- Author:
- Aaron Holroyd (aholroyd (at) wpi (dot) edu)
- Enumerator:
ALWAYS |
This constant is used for always printing the debug information.
|
INIT |
This constant is used for stating initialization of objects.
|
POLICY_EXECUTION |
This constant is used for debug statements from policies
|
BML_EXECUTION |
This constant is used for the executors in the realizer node.
|
BEHAVIOR |
This constant is used for the behaviors.
|
SCHEDULE |
This constant is used for scheduling the behaviors.
|
MATH |
This constant is used for math and other calculations
|
IO |
This constant is used for printing input and output
|
MASTER |
This constant is used for printing Master Spinner information
|
ALL |
This constant is used for only printing a debug message if the user wants all of the debug output.
|
Definition at line 257 of file Logger.java.
Constructor & Destructor Documentation
edu::wpi::hri::log::Logger::Logger |
( |
LoggerLevel |
level, |
|
|
Colors |
color, |
|
|
String |
name | |
|
) |
| | [inline, protected] |
Member Function Documentation
final String edu::wpi::hri::log::Logger::concat |
( |
Colors |
color, |
|
|
String |
str | |
|
) |
| | [inline, protected] |
static Logger edu::wpi::hri::log::Logger::createBase |
( |
LoggerLevel |
maxLevel, |
|
|
String |
type, |
|
|
Colors |
color, |
|
|
String |
name | |
|
) |
| | [inline, static] |
Create the base logger object from the type specified by the parameters.
- Parameters:
-
| maxLevel | The max level of the logger |
| type | The type of logger to create |
| color | The color of the base tag to use |
| name | The name of the base tag |
- Returns:
- The created logger.
Definition at line 152 of file Logger.java.
static Logger edu::wpi::hri::log::Logger::createDefault |
( |
|
) |
[inline, static] |
DO NOT USE THIS IN NORMAL OPERATION, helpful for testing purposes only
- Returns:
- a default logger.
Definition at line 169 of file Logger.java.
abstract void edu::wpi::hri::log::Logger::debug |
( |
LoggerLevel |
level, |
|
|
String |
str | |
|
) |
| | [pure virtual] |
abstract void edu::wpi::hri::log::Logger::error |
( |
String |
str |
) |
[pure virtual] |
abstract void edu::wpi::hri::log::Logger::fatal |
( |
String |
str, |
|
|
int |
exitCode | |
|
) |
| | [pure virtual] |
abstract void edu::wpi::hri::log::Logger::info |
( |
String |
str |
) |
[pure virtual] |
void edu::wpi::hri::log::Logger::printThrowable |
( |
LoggerLevel |
level, |
|
|
Throwable |
e | |
|
) |
| | [inline] |
Create a print stream which can output information to this logger.
- Returns:
- The created print stream.
Definition at line 61 of file Logger.java.
final Logger edu::wpi::hri::log::Logger::sub |
( |
Colors |
color, |
|
|
String |
name | |
|
) |
| | [inline] |
Create a Sub logger from this logger which uses the given Color and the given name when printing information.
- Parameters:
-
| color | The color to print the name in. |
| name | The name to use when printing. |
- Returns:
- The new Sub logger created.
Definition at line 134 of file Logger.java.
abstract void edu::wpi::hri::log::Logger::warn |
( |
String |
str |
) |
[pure virtual] |
Member Data Documentation
The documentation for this class was generated from the following file:
|