SK.gnome.dwarf.log
Class NullLogger
java.lang.Object
SK.gnome.dwarf.GenericService
SK.gnome.dwarf.thread.ThreadService
SK.gnome.dwarf.log.GenericLogger
SK.gnome.dwarf.log.NullLogger
- All Implemented Interfaces:
- Logger, java.lang.Runnable, Service
- public class NullLogger
- extends GenericLogger
The null logger.
This logger simply discards all log messages.
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 |
NullLogger(java.lang.String name)
Creates a new NullLogger. |
Method Summary |
protected boolean |
wouldLog(java.lang.String facility,
LogLevel level)
Decides whether the message would be accepted by the logger.
|
protected void |
write(long time,
java.lang.String facility,
LogLevel level,
java.lang.String message,
java.lang.Throwable throwable)
Writes the message to a physical device.
|
Methods inherited from class SK.gnome.dwarf.log.GenericLogger |
enableThread, getLastAccessed, log, log, loop, setFacilities, setLevels, setMarkInterval, setRepeatedInterval, shutdown, start |
Methods inherited from class SK.gnome.dwarf.GenericService |
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, init, 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 |
NullLogger
public NullLogger(java.lang.String name)
- Creates a new NullLogger.
wouldLog
protected boolean wouldLog(java.lang.String facility,
LogLevel level)
- Decides whether the message would be accepted by the logger.
Returns always false therefore all messages are discarded by default.
- Overrides:
wouldLog
in class GenericLogger
- Parameters:
facility
- the logging facilitylevel
- the logging level
- Returns:
- always false
write
protected void write(long time,
java.lang.String facility,
LogLevel level,
java.lang.String message,
java.lang.Throwable throwable)
- Writes the message to a physical device.
This method actually does nothing.
- Specified by:
write
in class GenericLogger
- Parameters:
time
- the current time of the logged eventfacility
- the log facilitylevel
- the log levelmessage
- the messagethrowable
- the error (optional)- See Also:
GenericLogger.log(String, LogLevel, String)
,
GenericLogger.log(String, LogLevel, String, Throwable)
Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.