|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fhg.igd.logging.AbstractWrapper
de.fhg.igd.logging.log4j.Log4jWrapper
This class is a wrapper for a Logger object. It is responsible for
the proper initialization of its target and the handling of configuration
change requests. Furthermore, this is the point where log messages are
leaving the scope of the Logging Framework since they are being
handed over to the underlying Log4J logging mechanism.
| Field Summary | |
protected org.apache.log4j.Logger |
logger_
The wrapped logger object |
static String |
LOGGER_CLASS
The name of the wrapped logger class |
| Fields inherited from class de.fhg.igd.logging.AbstractWrapper |
level_, lname_, name_, oname_ |
| Constructor Summary | |
Log4jWrapper(String name,
LoggerImpl ref)
Create a Log4jWrapper object. |
|
| Method Summary | |
protected void |
addForwarderFor(URL url)
Add a new Forwarder for the given URL to the
wrapped logger. |
protected void |
initTarget(LoggerImpl ref)
Initialize the implementation specific logger target. |
void |
postLogEntry(LogLevel level,
String msg)
Post a log entry into the underlying logging mechanism by means of the wrapped logger. |
protected void |
removeAllForwarders()
Remove all Forwarder and similar objects (e.g. |
protected void |
removeForwarderFor(URL url)
Remove a Forwarder for the given URL from the
wrapped logger. |
protected void |
setLogLevel(LogLevel level)
Set the log level of the wrapped logger. |
String |
toString()
|
| Methods inherited from class de.fhg.igd.logging.AbstractWrapper |
addForwarder, chronometerFor, dismiss, equals, getLogLevel, getName, hashCode, removeForwarder |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String LOGGER_CLASS
protected org.apache.log4j.Logger logger_
| Constructor Detail |
public Log4jWrapper(String name,
LoggerImpl ref)
Log4jWrapper object.
name - The name of the wrapped loggerref - A reference to the requesting instance| Method Detail |
protected void initTarget(LoggerImpl ref)
AbstractWrapper
initTarget in class AbstractWrapperref - The Logger implementation that originally
requested this wrapper
public void postLogEntry(LogLevel level,
String msg)
Wrapper
level - The log level to be usedmsg - The message to be posted by the wrapped loggerprotected void addForwarderFor(URL url)
AbstractWrapperForwarder for the given URL to the
wrapped logger.
addForwarderFor in class AbstractWrapperurl - The new output destination to be added to the wrapped loggerprotected void removeForwarderFor(URL url)
AbstractWrapperForwarder for the given URL from the
wrapped logger.
removeForwarderFor in class AbstractWrapperurl - The output destination to be removed from the wrapped loggerprotected void removeAllForwarders()
AbstractWrapperForwarder and similar objects (e.g.
Handler instances for the Sun
logging system) for the given URL.
removeAllForwarders in class AbstractWrapperprotected void setLogLevel(LogLevel level)
AbstractWrapper
setLogLevel in class AbstractWrapperlevel - The new log levelpublic String toString()
toString in class AbstractWrapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||