OverviewSingleDeprecated

jsx3.util

class Logger.Handler

Object
->jsx3.lang.Object
  ->jsx3.util.Logger.Handler

Direct Known Subclasses:

jsx3.util.Logger.FormatHandler, jsx3.util.Logger.MemoryHandler

class Logger.Handler
extends jsx3.lang.Object
The base logging handler class. Handlers receive log records from loggers and output (or ignore) them in some way.

Concrete subclasses of this class must implement the handle() method. This method defines what to do to "handle" the logging record. This method does not need to check the handler's level against the level of the record. The the logger does this before calling handle() and will not call handle() if the record's level is not severe enough.

Constructor Summary
void
init(strName : String)
Method Summary
int
Returns the level of this handler.
String
Returns the name of this Handler.
abstract void
Concrete subclasses of this class must implement this method, which defines how a log record is handled.
boolean
isLoggable(intLevel : int)
Returns true if a log message sent to this handler at level intLevel will be processed rather than ignored.
static void
Call this method to let the logging system know that a new subclass of Handler has been defined.
int
setLevel(intLevel : ?)
Sets the level of this handler.
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Constructor Detail

init

void init(strName : String)

Parameters:

strNamethe name to assign this handler
Method Detail

getLevel

int getLevel()
Returns the level of this handler. May be null if no level has been specified.

Returns:

 

getName

String getName()
Returns the name of this Handler.

Returns:

 

handle

abstract void handle(objRecord : jsx3.util.Logger.Record)
Concrete subclasses of this class must implement this method, which defines how a log record is handled.

Parameters:

objRecord

isLoggable

boolean isLoggable(intLevel : int)
Returns true if a log message sent to this handler at level intLevel will be processed rather than ignored.

Parameters:

intLevelthe level to test

Returns:

 

registerHandlerClass

static void registerHandlerClass(objClass : jsx3.lang.Class)
Call this method to let the logging system know that a new subclass of Handler has been defined. Handlers may be defined in the configuration file to be lazy. The class of a lazy handler is not required to exist when the logging system initializes. However, for the lazy handler to be instantiated, this method must be called to let the logging system know that the necessary class has loaded.

Parameters:

objClassthe subclass of Handler that was defined

setLevel

int setLevel(intLevel : ?)
Sets the level of this handler.

Parameters:

intLevel

Returns:

one of FATAL to TRACE, OFF, or null