|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.log4j.Category
org.apache.log4j.Logger
org.mmbase.util.logging.log4j.Log4jImpl
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'.
| Field Summary |
| Fields inherited from class org.apache.log4j.Category |
additive, level, name, parent, resourceBundle |
| Constructor Summary | |
protected |
Log4jImpl(java.lang.String name)
Constructor, like the constructor of Logger. |
| Method Summary | |
static void |
configure(java.lang.String s)
Calls the configure method of DOMConfigurator, and redirect standard error to STDERR category. |
protected static void |
doConfigure(java.io.File f)
Performs the actual parsing of the log4j configuration file and handles the errors |
static java.io.File |
getConfigurationFile()
|
static org.apache.log4j.Category |
getInstance(java.lang.String name)
This method overrides Category.getInstance(java.lang.String) by supplying
its own factory type as a parameter. |
static org.apache.log4j.Logger |
getLogger(java.lang.String name)
|
static Log4jImpl |
getLoggerInstance(java.lang.String name)
As getLogger, but casted to MMBase Logger already. |
boolean |
isServiceEnabled()
Returns true if for this category (Logger), a call to service (debug or trace) would do something. |
void |
service(java.lang.Object message)
A new logging method that takes the SERVICE priority. |
void |
setLevel(Level p)
If you want to override the level in the configuration file fixed for this category, you can do it with this method. |
void |
setPriority(Level p)
Deprecated. use setLevel |
static void |
shutdown()
|
void |
trace(java.lang.Object message)
A new logging method that takes the TRACE priority. |
| Methods inherited from class org.apache.log4j.Logger |
getLogger, getLogger, getRootLogger |
| Methods inherited from class org.apache.log4j.Category |
addAppender, assertLog, callAppenders, debug, debug, error, error, exists, fatal, fatal, forcedLog, getAdditivity, getAllAppenders, getAppender, getChainedPriority, getCurrentCategories, getDefaultHierarchy, getEffectiveLevel, getHierarchy, getInstance, getLevel, getLoggerRepository, getName, getParent, getPriority, getResourceBundle, getResourceBundleString, getRoot, info, info, isAttached, isDebugEnabled, isEnabledFor, isInfoEnabled, l7dlog, l7dlog, log, log, log, removeAllAppenders, removeAppender, removeAppender, setAdditivity, setLevel, setPriority, setResourceBundle, warn, warn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.util.logging.Logger |
debug, error, fatal, info, isDebugEnabled, warn |
| Constructor Detail |
protected Log4jImpl(java.lang.String name)
Logger.
| Method Detail |
public static Log4jImpl getLoggerInstance(java.lang.String name)
public static void configure(java.lang.String s)
protected static void doConfigure(java.io.File f)
public static java.io.File getConfigurationFile()
public void setPriority(Level p)
setPriority in interface Loggerpublic void setLevel(Level p)
Logger
setLevel in interface Loggerp - The level of the priority. One of the constants
Level.TRACE, Level.DEBUG, Level.SERVICE, Level.INFO,
Level.WARN, Level.ERROR or Level.FATAL.public static org.apache.log4j.Category getInstance(java.lang.String name)
Category.getInstance(java.lang.String) by supplying
its own factory type as a parameter.
public static org.apache.log4j.Logger getLogger(java.lang.String name)
public final void trace(java.lang.Object message)
trace in interface LoggerLogger.debug(java.lang.Object)public final void service(java.lang.Object message)
service in interface Loggerpublic final boolean isServiceEnabled()
Logger
isServiceEnabled in interface Loggerpublic static void shutdown()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||