MyLoggerpublic 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 void | debug(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.Logger | getLogger(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 void | trace(java.lang.Object message)
super.log(FQCN, XLevel.TRACE, message, null);
|
|