|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.GenericService SK.gnome.dwarf.GenericServer SK.gnome.dwarf.log.LogServer
Provides container for the logging services.
It can be used to logically group various logging services to build a more complex
logging subsystem. (Note that a logging service must implement the Logger
interface.)
The two inherited log methods are overriden in a way that they simply pass the log
requests to all logging services contained by this LogServer.
Implementation note:No logging services may be added or removed from this server instance safely while it is running.
Field Summary |
Fields inherited from class SK.gnome.dwarf.GenericService |
initParameters, parent |
Fields inherited from interface SK.gnome.dwarf.Service |
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED |
Constructor Summary | |
LogServer(java.lang.String name)
Creates a new LogServer. |
Method Summary | |
protected Logger |
getLogger()
Returns the logging service. |
void |
log(java.lang.String facility,
LogLevel level,
java.lang.String message)
Logs the message with the given logging level and facility. |
void |
log(java.lang.String facility,
LogLevel level,
java.lang.String message,
java.lang.Throwable error)
Logs the message and the error with the given logging level and facility. |
Methods inherited from class SK.gnome.dwarf.GenericServer |
addService, addService, getAuthenticator, getParameters, getService, getServices, getServices, init, removeService, report, shutdown, start, stop |
Methods inherited from class SK.gnome.dwarf.GenericService |
getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getName, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface SK.gnome.dwarf.Service |
getFullName, getName, getState, log, log, login, logout |
Constructor Detail |
public LogServer(java.lang.String name)
Method Detail |
public final void log(java.lang.String facility, LogLevel level, java.lang.String message)
Calls the log(String, LogLevel, String)
method of each contained logging
service with the corresponding arguments.
log
in interface Logger
facility
- the logging facilitylevel
- the logging levelmessage
- the messagepublic final void log(java.lang.String facility, LogLevel level, java.lang.String message, java.lang.Throwable error)
Calls the log(String, LogLevel, String, Throwable)
method of each contained
logging service with the corresponding arguments.
log
in interface Logger
facility
- the logging facilitylevel
- the logging levelmessage
- the messageerror
- the errorprotected Logger getLogger()
It returns a reference to this object, because otherwise all logging requests would be diverted to the first one of the contained loggers only.
getLogger
in class GenericServer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |