|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.logging.AbstractWrapper de.fhg.igd.logging.sun.SunWrapper
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 Sun logging mechanism.
Field Summary | |
protected Logger |
logger_
The wrapped logger object |
static String |
LOGGER_CLASS
The name of the target logger class |
Fields inherited from class de.fhg.igd.logging.AbstractWrapper |
level_, lname_, name_, oname_ |
Constructor Summary | |
SunWrapper(String name,
LoggerImpl ref)
Create a SunTargetWrapper 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 Logger logger_
Constructor Detail |
public SunWrapper(String name, LoggerImpl ref)
SunTargetWrapper
object.
name
- The name of the wrapped loggerref
- A reference to the requesting instanceMethod Detail |
protected void initTarget(LoggerImpl ref)
AbstractWrapper
initTarget
in class AbstractWrapper
ref
- The Logger
implementation that originally
requested this wrapperpublic 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)
AbstractWrapper
Forwarder
for the given URL
to the
wrapped logger.
addForwarderFor
in class AbstractWrapper
url
- The new output destination to be added to the wrapped loggerprotected void removeForwarderFor(URL url)
AbstractWrapper
Forwarder
for the given URL
from the
wrapped logger.
removeForwarderFor
in class AbstractWrapper
url
- The output destination to be removed from the wrapped loggerprotected void removeAllForwarders()
AbstractWrapper
Forwarder
and similar objects (e.g.
Handler
instances for the Sun
logging system) for the given URL
.
removeAllForwarders
in class AbstractWrapper
protected void setLogLevel(LogLevel level)
AbstractWrapper
setLogLevel
in class AbstractWrapper
level
- 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 |