uk.org.iscream.cms.server.core
Class LoggerServant

java.lang.Object
  extended byorg.omg.PortableServer.Servant
      extended byuk.org.iscream.cms.server.core.LoggerPOA
          extended byuk.org.iscream.cms.server.core.LoggerServant
All Implemented Interfaces:
InvokeHandler, LoggerOperations

class LoggerServant
extends LoggerPOA

The LoggerServant is an implementation of the Logger defined in the IDL interface. Allows classes to send logging information over CORBA to a local implementation of the LoggerImpl interface.

Version:
$Id: LoggerServant.java,v 1.14 2004/08/01 10:40:54 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  LoggerImpl _logger
          The actual Logger used by this instance
private  String _name
          This is the friendly identifier of the component this class is running in.
private  int _verbosityLevel
          The verbosity level of this instance
 String REVISION
          The current CVS revision of this class
static String[] VERBOSITY_NAMES
          An array of names of verbosity levels.
 
Fields inherited from class uk.org.iscream.cms.server.core.LoggerPOA
 
Fields inherited from class org.omg.PortableServer.Servant
 
Fields inherited from interface uk.org.iscream.cms.server.core.LoggerOperations
DEBUG, ERROR, FATAL, SYSINIT, SYSMSG, WARNING
 
Constructor Summary
LoggerServant(LoggerImpl logger)
          Creates a new LoggerServant.
 
Method Summary
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 void write(String source, int verbosity, String message)
          The write() method takes a source, verbosity level and message, and formats them using an external line formatting method.
 
Methods inherited from class uk.org.iscream.cms.server.core.LoggerPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

VERBOSITY_NAMES

public static final String[] VERBOSITY_NAMES
An array of names of verbosity levels. Thus logging messages are now "classed" by the level" This string is prepended to the "source" of a logging message.


_verbosityLevel

private int _verbosityLevel
The verbosity level of this instance


_logger

private LoggerImpl _logger
The actual Logger used by this instance


_name

private String _name
This is the friendly identifier of the component this class is running in. eg, a Filter may be called "filter1", If this class does not have an owning component, a name from the configuration can be placed here. This name could also be changed to null for utility classes.

Constructor Detail

LoggerServant

public LoggerServant(LoggerImpl logger)
Creates a new LoggerServant.

Parameters:
logger - a reference to the LoggerImpl this will use
Method Detail

write

public void write(String source,
                  int verbosity,
                  String message)
The write() method takes a source, verbosity level and message, and formats them using an external line formatting method. This line is then given to the logger to be written. Note that checking of the level is carried out here.

Parameters:
source - A string representation of the calling object.
verbosity - the verbosity of this message
message - The text to be logged.

toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.org.iscream.cms.util.FormatName class to format the toString()

Returns:
the name of this class and its CVS revision


Copyright © 2000-2003 i-scream. All Rights Reserved.