| org.mmbase.util.logging.log4j.Log4jImpl
Log4jImpl | final public class Log4jImpl extends org.apache.log4j.Logger implements Logger(Code) | | This Logger implementation extends the Logger class from the log4j
project (version >= 1.2). It has the following extra functionality.
First of all it uses the LoggerLevel class for Level, and so
has two extra priorities, namely 'trace' and 'service'.
Further it instantiates one object of itself, named `STDERR' to
which stderr will be redirected. Normally this will happen with
priority `info' but Exceptions will get priorty `fatal'.
It also has a static member method `configure', which calls the
configure of DOMConfigurator, in this way log4j classes are used
only here, and the rest of MMBase can use only `Logger'.
author: Michiel Meeuwissen |
Constructor Summary | |
protected | Log4jImpl(String name) Constructor, like the constructor of
org.apache.log4j.Logger . |
Log4jImpl | protected Log4jImpl(String name)(Code) | | Constructor, like the constructor of
org.apache.log4j.Logger .
|
configure | public static void configure(String s)(Code) | | Calls the configure method of DOMConfigurator, and redirect
standard error to STDERR category. It also starts up the
FileWatcher. The 'configureAndWatch' method of DOMConfigurator
used to be used, but it is not feasible anymore because
1. cannot give the repository then. 2. Cannot log the happening
on normal way.
Parameters: s - A string to the xml-configuration file. Can beabsolute, or relative to the Logging configuration file. |
doConfigure | protected static void doConfigure(File f)(Code) | | Performs the actual parsing of the log4j configuration file and handles the errors
|
getInstance | public static org.apache.log4j.Category getInstance(String name)(Code) | | This method overrides
org.apache.log4j.Logger.getInstance by supplying
its own factory type as a parameter.
|
getLogger | public static org.apache.log4j.Logger getLogger(String name)(Code) | | |
getLoggerInstance | public static Log4jImpl getLoggerInstance(String name)(Code) | | As getLogger, but cast to MMBase Logger already. And the possible
ClassCastException is caught.
|
isServiceEnabled | final public boolean isServiceEnabled()(Code) | | |
isTraceEnabled | final public boolean isTraceEnabled()(Code) | | |
service | final public void service(Object message)(Code) | | A new logging method that takes the SERVICE priority.
|
shutdown | public static void shutdown()(Code) | | |
trace | final public void trace(Object message)(Code) | | A new logging method that takes the TRACE priority.
|
|
|