de.intarsys.tools.logging
Class LogHandlerSwitcher
java.lang.Object
de.intarsys.tools.logging.LogHandlerSwitcher
public class LogHandlerSwitcher
- extends Object
A tool class that provides the mechanics for a thread context sensitive log
handler attached to a dedicated Logger. By default, the handler is
attached to the root logger.
LogHandlerSwitcher
public LogHandlerSwitcher()
attach
public void attach()
- Attach the handler to the current thread.
destroy
public void destroy()
detach
public void detach()
- Detach the handler from the current thread.
getHandler
public Handler getHandler()
getHandlerAttached
public Handler getHandlerAttached()
getHandlerDetached
public Handler getHandlerDetached()
getHandlerFactory
public IHandlerFactory getHandlerFactory()
getLoggerName
public String getLoggerName()
init
public void init()
throws IOException
- Throws:
IOException
isHandlerPerAttach
public boolean isHandlerPerAttach()
setHandlerFactory
public void setHandlerFactory(IHandlerFactory logHandlerFactory)
setHandlerPerAttach
public void setHandlerPerAttach(boolean logPerRequest)
setLoggerName
public void setLoggerName(String loggerName)
Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.