FileDocCategorySizeDatePackage
MyLogger.javaAPI DocApache log4j 1.2.152222Sat Aug 25 00:09:44 BST 2007examples.subclass

MyLogger

public class MyLogger extends Logger
A simple example showing logger subclassing.

See source code for more details.

See {@link MyLoggerTest} for a usage example.

Fields Summary
static String
FQCN
private static MyLoggerFactory
myFactory
Constructors Summary
public MyLogger(String name)
Just calls the parent constuctor.


              
     
    super(name);
  
Methods Summary
public voiddebug(java.lang.Object message)
Overrides the standard debug method by appending " world" at the end of each message.

    super.log(FQCN, Level.DEBUG, message + " world.", null);    
  
public static org.apache.log4j.LoggergetLogger(java.lang.String name)
This method overrides {@link Logger#getLogger} by supplying its own factory type as a parameter.

    return Logger.getLogger(name, myFactory); 
  
public voidtrace(java.lang.Object message)

    super.log(FQCN, XLevel.TRACE, message, null);