Robot Core Documentation
|
The Logger class provides a mechanism to log messages. More...
Static Public Member Functions | |
static void | log (String tag, int level, String message, boolean noLogToConsole) |
static void | setLogLevel (int level) |
static void | setLogLevel (String tag, int level) |
static void | setLogFile (String name) |
static void | setLogFile (String tag, String name) |
static void | setLogFile (String tag, String name, boolean logTime) |
static void | setLogFile (String tag, String name, boolean logTime, boolean logToConsole) |
static void | closeLogFile () |
static void | closeLogFile (String tag) |
static void | closeAllLogFiles () |
static long | getElapsedTime () |
static void | resetElapsedTime () |
static void | startLoggingServer () |
The Logger class provides a mechanism to log messages.
This class provides a mechanism to log messages to either the console or a file or both. The messages are tagged by a name and a logging level. There is a global setting for the minimum logging level of messages. Messages with a logging level less than the minimum will not be logged. The default global logging level is -999 (i.e. everything is logged)
In addition, each specific tag can have an independent minimum logging level which controls whether messages of that type are logged. The default logging level for specific tags is 0.
By default messages are logged to the console. However you can specify that the messages be logged to a file, or both a file and the console. You can set a global file which will log all messages that do not have their own file specified. You can also specify a separate file for each tag.
|
static |
Close all log files.
|
static |
Close the master log file
|
static |
tag | - Close the log file associated with messages with this tag. |
|
static |
|
static |
tag | - Specifies the tag for this message. |
level | - Specifies the logging level. If this value is less than the current minimum level, this message will not be logged. |
message | - Specifies the message to log. |
noLogToConsole | - Specifies the this message should NOT be logged to che console. |
|
static |
Resets the elapsed time to zero
|
static |
name | - Specifies a file name. All logs of messages that do not have their own individual log files will be written to this file |
|
static |
tag | - Specifies the tag that is to be logged to a file. |
name | - Specifies a file name. All logs that are tagged with this value will be logged to this file |
Calls SetLogFile(tag, name, false)
|
static |
tag | - Specifies the tag that is to be logged to a file. |
name | - Specifies a file name. All logs that are tagged with this value will be logged to this file |
logTime | - If true, include the current time stamp for each logged line. |
Calls SetLogFile(tag, name, logTime, false)
|
static |
tag | - Specifies the tag that is to be logged to a file. |
name | - Specifies a file name. All logs that are tagged with this value will be logged to this file |
logTime | - If true, include the current time stamp for each logged line. |
logToConsole | - If true, log messages to the console as well as the file |
|
static |
level | - Specifies the global logging level. No messages less than this level will be logged, regardless of the logging level for the log type. |
|
static |
tag | - Specifies the tag for the log type for which the level is to be set. |
level | - Specifies the new logging level. For messages that are tagged with this tag, if the log level of the message is less than this value, the message will not be logged. |
|
static |
Starts a network server that can be contacted to receive the log strings. The server listens on port 5810.