- public class LoggerSwitch
- extends java.lang.Object
A proxy logger that switches between two underlying loggers
with recursive invocation detection.
This class is intended to be used by o.a.a.e.logger.AbstractLoggerManager.
all the logger switching is done in it during the "warm-up" phase
(constructor, enableLogging, contextualize, configure, start).
All these operations are held our on a single thread and the
object is not exposed to other threads untill (in strict synchronization
sense) it has been fully configured. That's why there is no synchronization
in this class. If the switching was to occur in a mulitythreaded
fasion we would have to synchronize access to m_fallback and m_preferred.
- Avalon Development Team
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected static final Logger SHARED_NULL
public LoggerSwitch(Logger fallback)
public LoggerSwitch(Logger fallback,
public Logger get()
- We create a logger with no methods for changing
m_fallback and m_preferred for security reasons.
All the control is done by the parent class
that does not implement Logger itself.
public void setFallback(Logger fallback)
public void setPreferred(Logger preferred)
Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.