public class SpyLogFactory extends Object
Modifications for log4j2:
#loadSpyLogDelegator() method
to choose between the new Log4j2SpyLogDelegator,
or an alternative SpyLogDelegator.
This method uses net.sf.log4jdbc.log4j2.Properties#getSpyLogDelegatorName()
to determine which logger to use.
logger attribute
if null when calling #getSpyLogDelegator().
SpyLogDelegator
| Modifier and Type | Method and Description |
|---|---|
static SpyLogDelegator |
getSpyLogDelegator()
Return the
SpyLogDelegator. |
static void |
loadSpyLogDelegator(String spyLogDelegatorName)
Set the appropriate
SpyLogDelegator
depending on spyLogDelegatorName. |
static void |
setSpyLogDelegator(SpyLogDelegator logDelegator) |
public static SpyLogDelegator getSpyLogDelegator()
SpyLogDelegator.
If not already initialized (for instance, using
setSpyLogDelegator(SpyLogDelegator)), this getter will load it first,
using the log4j2.Properties.
If the name is null, load log4j2.Log4j2SpyLogDelegator,
otherwise, try to load the corresponding class.SpyLogDelegator to use.setSpyLogDelegator(SpyLogDelegator)public static void loadSpyLogDelegator(String spyLogDelegatorName)
SpyLogDelegator
depending on spyLogDelegatorName.
If null, load log4j2.Log4j2SpyLogDelegator,
otherwise, try to load the corresponding class.spyLogDelegatorName - A String representing the name
of the class implementing SpyLogDelegator
to load. If null,
load Log4j2SpyLogDelegator.Slf4jSpyLogDelegator,
log4j2.Log4j2SpyLogDelegatorpublic static void setSpyLogDelegator(SpyLogDelegator logDelegator)
logDelegator - the log delegator responsible for actually logging
JDBC events.Copyright © 2013 Bgee - Swiss Institute of Bioinformatics. All Rights Reserved.