com.bankframe.services.logger
Class ELoggerFactory

java.lang.Object
  extended bycom.bankframe.services.logger.ELoggerFactory
Direct Known Subclasses:
ConsoleLoggerFactory, LOG4JLoggerFactory

public abstract class ELoggerFactory
extends java.lang.Object

This class is the base class for all ELogger factory classes.

Usage

Calling classes which want to obtain an ELogger instance should call getLogger(String) as follows:
   import com.bankframe.services.logger.ELogger;
   import com.bankframe.services.logger.ELoggerFactory;

   public class Foo {

      private static final ELogger log = ELoggerFactory.getLogger(Foo.class);
      ...
   }
 

Configuring the logging implementation

The actual factory implementation used to create logger instances is configured via the com.eontec.mca.elogger.factory Java Property. This setting should specifiy the full class name of an ELoggerFactory subclass. If none is defined then the com.bankframe.services.logger.console.ConsoleLoggerFactory will be used as a default.

Developing a custom logging implementation

To provide a custom logging implementation you must carry out the following steps:


Field Summary
static java.lang.String FACTORY_PROPERTY
          This java property specifies the logger factory to use
static java.lang.String FACTORY_PROPERTY_FILE
          This specifies the property file to use if FACTORY_PROPERTY not defined
static java.lang.String LOGGER_ENABLED
          This java property specifies whether logging is enabled or disabled
 
Method Summary
static ELogger getLogger()
          Deprecated. Use getLogger(String) or getLogger(Class) instead
static ELogger getLogger(java.lang.Class subsystem)
          This method returns a logger for the specified subsystem.
static ELogger getLogger(java.lang.String subsystem)
          This method returns a logger for the specified subsystem.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_PROPERTY

public static final java.lang.String FACTORY_PROPERTY
This java property specifies the logger factory to use

See Also:
Constant Field Values

LOGGER_ENABLED

public static final java.lang.String LOGGER_ENABLED
This java property specifies whether logging is enabled or disabled

See Also:
Constant Field Values

FACTORY_PROPERTY_FILE

public static final java.lang.String FACTORY_PROPERTY_FILE
This specifies the property file to use if FACTORY_PROPERTY not defined

See Also:
Constant Field Values
Method Detail

getLogger

public static ELogger getLogger()
Deprecated. Use getLogger(String) or getLogger(Class) instead

This method returns the default logger


getLogger

public static ELogger getLogger(java.lang.Class subsystem)
This method returns a logger for the specified subsystem. If the logging system does not support the concept of subsystems or no such subsystem is configured then the default logger will be returned.

Parameters:
subsystem - The logging subystem to be used
Returns:
ELogger instance

getLogger

public static ELogger getLogger(java.lang.String subsystem)
This method returns a logger for the specified subsystem. If the logging system does not support the concept of subsystems or no such subsystem is configured then the default logger will be returned.

Parameters:
subsystem - The logging subystem to be used
Returns:
ELogger instance

main

public static void main(java.lang.String[] args)


Copyright © 2005, 2007, Oracle. All rights reserved.