kaos.core.util
Class SimpleLogger

java.lang.Object
  extended by kaos.core.util.Logger
      extended by kaos.core.util.SimpleLogger
All Implemented Interfaces:
java.io.Serializable

public class SimpleLogger
extends Logger

See Also:
Serialized Form

Field Summary
static int OUTPUT_STDERR
           
static int OUTPUT_STDOUT
           
 
Fields inherited from class kaos.core.util.Logger
DEBUG, ERROR, FATAL, INFO, LEVEL_CAPTAIN, LEVEL_GENERAL, LEVEL_MAJOR, LEVEL_PRIVATE, WARN
 
Constructor Summary
SimpleLogger(java.lang.Object requestor)
           
 
Method Summary
static int getDestination()
          getDestination Get the current destination.
static int getLevel()
          getLevel Get the current message level.
 boolean isEnabledFor(int level)
           
 void logMessage(java.lang.String message, int level)
           
 void logMessage(java.lang.String message, java.lang.Throwable t, int level)
           
static void setDestination(int destination)
          setDestination Set the output object; used by customers, also when object is null (as after an agent moves).
static void setLevel(int newLevel)
          setLevel Get the current message level.
 
Methods inherited from class kaos.core.util.Logger
getLogger, getLoggerFactory, setLoggerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_STDOUT

public static final int OUTPUT_STDOUT
See Also:
Constant Field Values

OUTPUT_STDERR

public static final int OUTPUT_STDERR
See Also:
Constant Field Values
Constructor Detail

SimpleLogger

public SimpleLogger(java.lang.Object requestor)
Method Detail

isEnabledFor

public boolean isEnabledFor(int level)
Specified by:
isEnabledFor in class Logger

logMessage

public void logMessage(java.lang.String message,
                       int level)
Specified by:
logMessage in class Logger

logMessage

public void logMessage(java.lang.String message,
                       java.lang.Throwable t,
                       int level)
Specified by:
logMessage in class Logger

getDestination

public static int getDestination()
getDestination Get the current destination.

Parameters:
(none) -

getLevel

public static int getLevel()
getLevel Get the current message level.

Parameters:
(none) -

setLevel

public static void setLevel(int newLevel)
setLevel Get the current message level.

Parameters:
Integer - 'newLevel'; use Logger.LEVEL_GENERAL, LEVEL_MAJOR, LEVEL_CAPTAIN, or LEVEL_PRIVATE.

setDestination

public static void setDestination(int destination)
setDestination Set the output object; used by customers, also when object is null (as after an agent moves).

Parameters:
Integer - 'desitination'; should be either Logger.OUTPUT_STDOUT or Logger.OUTPUT_STDERR