All Packages Class Hierarchy This Package Previous Next Index
Class sics.agentbase.core.Logger
java.lang.Object
|
+----sics.agentbase.core.Logger
- public class Logger
- extends Object
The Logger is an object that handles optional logging of information.
It should be used instead of System.out.println to
enable logging to be turned on and off at one point in the system.
The Logger also enables the use of several degrees of logging.
-
DEBUG
- The DEBUG log level enables all logging.
-
ERRORS
- The ERRORS log level enables only error logging.
-
NONE
- The NONE log level disables logging.
-
NORMAL
- The NORMAL log level enables some logging.
-
Logger()
-
-
debug(String, String)
- Outputs a level 1 log message.
-
debug(String, String, Object)
- Outputs a level 1 log message.
-
err(String, String)
- Outputs a level 3 log message.
-
err(String, String, Object)
- Outputs a level 3 log message.
-
msg(String, String)
- Outputs a level 2 log message.
-
msg(String, String, Object)
- Outputs a level 2 log message.
-
setLogLevel(int)
- Sets the active log level.
DEBUG
public static final int DEBUG
- The DEBUG log level enables all logging.
NORMAL
public static final int NORMAL
- The NORMAL log level enables some logging.
ERRORS
public static final int ERRORS
- The ERRORS log level enables only error logging.
NONE
public static final int NONE
- The NONE log level disables logging.
Logger
public Logger()
setLogLevel
public static void setLogLevel(int level)
- Sets the active log level.
The level can be specified as DEBUG, NORMAL, ERRORS, or NONE.
- Parameters:
- level - the log level
- See Also:
- DEBUG, NORMAL, ERRORS, NONE
debug
public static void debug(String name,
String msg)
- Outputs a level 1 log message.
- Parameters:
- name - the name of the logging object.
- msg - the log message.
debug
public static void debug(String name,
String msg,
Object object)
- Outputs a level 1 log message.
- Parameters:
- name - the name of the logging object.
- msg - the log message.
- object - an object (possibly a String) that will be placed
on its own row.
msg
public static void msg(String name,
String msg)
- Outputs a level 2 log message.
- Parameters:
- name - the name of the logging object.
- msg - the log message.
msg
public static void msg(String name,
String msg,
Object object)
- Outputs a level 2 log message.
- Parameters:
- name - the name of the logging object.
- msg - the log message.
- object - an object (possibly a String) that will be placed
on its own row.
err
public static void err(String name,
String msg)
- Outputs a level 3 log message.
- Parameters:
- name - the name of the logging object.
- msg - the log message.
err
public static void err(String name,
String msg,
Object object)
- Outputs a level 3 log message.
- Parameters:
- name - the name of the logging object.
- msg - the log message.
- object - an object (possibly a String) that will be placed
on its own row.
All Packages Class Hierarchy This Package Previous Next Index