org.bushe.swing.event
Class Logger
java.lang.Object
org.bushe.swing.event.Logger
public class Logger
- extends Object
Central Logging class. Shields code from Logging implementation.
The EventBus allows operation in two modes - using java.util.logging so that
the EventBus can be deployed in its own jar or using any logging system supported
by apache commons logging, which of course requires other jars.
The EventBus logging uses the names of its classes as the log, primarily
"org.bushe.swing.event.EventService". This aids in debugging which subscription and publication issues.
Implementation note: There are no imports in this class to make things
explicit. There is also no explicit use of classes outside java.util,
anything else is used by reflection to avoid NoClassDefFound errors on class load.
Nested Class Summary |
static class |
Logger.Level
Standardized logging levels. |
static class |
Logger.LoggerType
Allows switching between Java and Commons logging. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER_TYPE
public static Logger.LoggerType LOGGER_TYPE
Logger
public Logger(Logger utilLogger)
Logger
public Logger(Object commonsLogger)
getLogger
public static Logger getLogger(String name)
isLoggable
public boolean isLoggable(Logger.Level level)
- Returns whether this level is loggable. If there is
a misconfiguration, this will always return false.
- Parameters:
level
- the EventBus Logger level
- Returns:
- whether this level is loggable.
debug
public void debug(String message)
log
public void log(Logger.Level level,
String message)
log
public void log(Logger.Level level,
String message,
Throwable throwable)
Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.