electric.util.log
Class Logger

java.lang.Object
  extended byelectric.util.log.Logger
All Implemented Interfaces:
ILogger
Direct Known Subclasses:
WriterLogger

public abstract class Logger
extends java.lang.Object
implements ILogger

Logger is an abstract class that implements everything about an ILogger except for a concrete implementation of event().

Author:
webMethods

Constructor Summary
Logger()
           
Logger(long mask)
           
 
Method Summary
 void addMask(long mask)
          Add the specified mask to the current mask setting.
 void disable()
          Disable this logger.
 void enable()
          Enable this particular logger.
abstract  void event(java.lang.String category, java.lang.Object event, java.util.Date timestamp)
          If enabled, log an event of the specified category.
 long getMask()
          Return the mask that defines which events I should log.
 boolean isEnabled()
          Return true if the logger is enabled
 boolean isLogging(long mask)
          Return true if at the logger is logging a category defined by the mask.
 boolean isLogging(java.lang.String category)
          Return true if the logger is logging the specified category.
 void removeMask(long mask)
          Remove the specified mask from the current mask setting.
 void setMask(long mask)
          Set the mask that defines the events which I should log.
 void startLogging(java.lang.String category)
          Start logging events of the specified category.
 void stopLogging(java.lang.String category)
          Stop logging events of the specified category.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger()

Logger

public Logger(long mask)
Parameters:
mask -
Method Detail

isLogging

public boolean isLogging(long mask)
Return true if at the logger is logging a category defined by the mask.

Specified by:
isLogging in interface ILogger
Parameters:
mask - The mask.

isLogging

public boolean isLogging(java.lang.String category)
Return true if the logger is logging the specified category.

Specified by:
isLogging in interface ILogger
Parameters:
category - The category.

getMask

public long getMask()
Return the mask that defines which events I should log.

Specified by:
getMask in interface ILogger

setMask

public void setMask(long mask)
Set the mask that defines the events which I should log.

Specified by:
setMask in interface ILogger
Parameters:
mask -

addMask

public void addMask(long mask)
Add the specified mask to the current mask setting.

Parameters:
mask -

removeMask

public void removeMask(long mask)
Remove the specified mask from the current mask setting.

Parameters:
mask -

startLogging

public void startLogging(java.lang.String category)
Start logging events of the specified category.

Specified by:
startLogging in interface ILogger
Parameters:
category - The category.

stopLogging

public void stopLogging(java.lang.String category)
Stop logging events of the specified category.

Specified by:
stopLogging in interface ILogger
Parameters:
category - The category.

disable

public void disable()
Description copied from interface: ILogger
Disable this logger.

Specified by:
disable in interface ILogger

enable

public void enable()
Description copied from interface: ILogger
Enable this particular logger.

Specified by:
enable in interface ILogger

isEnabled

public boolean isEnabled()
Description copied from interface: ILogger
Return true if the logger is enabled

Specified by:
isEnabled in interface ILogger

event

public abstract void event(java.lang.String category,
                           java.lang.Object event,
                           java.util.Date timestamp)
If enabled, log an event of the specified category.

Specified by:
event in interface ILogger
Parameters:
category - The category.
event - The event, which is often just a simple string.
timestamp - The time of the event was logged.


copyright© 2001-2004 by webMethods All Rights Reserved.