public class LogbackFactoryAccessor extends DefaultAccessor
All Logback classes are loaded via the given class loader and not via psi-probe's own class loader. For this reasons, all methods on Logback objects are invoked via reflection.
This way, we can even handle different versions of Logback embedded in different WARs.
logger| Constructor and Description |
|---|
LogbackFactoryAccessor(ClassLoader cl)
Attempts to initialize a Logback logger factory via the given class loader.
|
| Modifier and Type | Method and Description |
|---|---|
List<LogbackAppenderAccessor> |
getAppenders()
Returns a list of wrappers for all Logback appenders that have an associated logger.
|
LogbackLoggerAccessor |
getLogger(String name)
Returns the Logback logger with a given name.
|
LogbackLoggerAccessor |
getRootLogger()
Returns the Logback root logger.
|
getApplication, getProperty, getProperty, getTarget, getTargetClass, invokeMethod, setApplication, setTargetpublic LogbackFactoryAccessor(ClassLoader cl) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException
cl - the ClassLoader to use when fetching the factoryClassNotFoundException - the class not found exceptionIllegalAccessException - the illegal access exceptionInvocationTargetException - the invocation target exceptionpublic LogbackLoggerAccessor getRootLogger()
public LogbackLoggerAccessor getLogger(String name)
name - the namepublic List<LogbackAppenderAccessor> getAppenders()
LogbackAppenderAccessors representing all appenders that are in useCopyright © 2009–2020 psi-probe. All rights reserved.