public class Logger extends java.lang.Object implements LogProducer, Configurable
LogEvent
,
LogSource
,
LogListener
,
Loggeable
,
SimpleLogListener
,
RotateLogListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NRPREFIX |
Constructor and Description |
---|
Logger() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(LogListener l) |
void |
destroy()
destroy logger
|
Configuration |
getConfiguration() |
static Logger |
getLogger(java.lang.String name) |
java.lang.String |
getName() |
boolean |
hasListeners()
Used by heavy used methods to avoid LogEvent creation
|
static void |
log(LogEvent evt) |
void |
removeAllListeners() |
void |
removeListener(LogListener l) |
void |
setConfiguration(Configuration cfg) |
void |
setName(java.lang.String name)
associates this Logger with a name using NameRegistrar
|
public static final java.lang.String NRPREFIX
public Configuration getConfiguration()
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
cfg
- Configuration objectConfigurationException
public void addListener(LogListener l)
addListener
in interface LogProducer
public void removeListener(LogListener l)
removeListener
in interface LogProducer
public void removeAllListeners()
removeAllListeners
in interface LogProducer
public static void log(LogEvent evt)
public void setName(java.lang.String name)
name
- name to registerNameRegistrar
public void destroy()
public static Logger getLogger(java.lang.String name)
NameRegistrar
public java.lang.String getName()
public boolean hasListeners()