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.


Variable Index

 o DEBUG
The DEBUG log level enables all logging.
 o ERRORS
The ERRORS log level enables only error logging.
 o NONE
The NONE log level disables logging.
 o NORMAL
The NORMAL log level enables some logging.

Constructor Index

 o Logger()

Method Index

 o debug(String, String)
Outputs a level 1 log message.
 o debug(String, String, Object)
Outputs a level 1 log message.
 o err(String, String)
Outputs a level 3 log message.
 o err(String, String, Object)
Outputs a level 3 log message.
 o msg(String, String)
Outputs a level 2 log message.
 o msg(String, String, Object)
Outputs a level 2 log message.
 o setLogLevel(int)
Sets the active log level.

Variables

 o DEBUG
 public static final int DEBUG
The DEBUG log level enables all logging.

 o NORMAL
 public static final int NORMAL
The NORMAL log level enables some logging.

 o ERRORS
 public static final int ERRORS
The ERRORS log level enables only error logging.

 o NONE
 public static final int NONE
The NONE log level disables logging.

Constructors

 o Logger
 public Logger()

Methods

 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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