public class SystemLogger extends Logger
This class supports either configuration with org.slf4j.Logger
or
configuration directly with a java.util.logging.Logger
.
This logger makes it easy to configure logging through a standard
logging framework, as might be present on a Java application server. By default
the logger uses the org.slf4j.LoggerFactory
to create a logger. This logger
can be supported at runtime by a wide variety of concrete backend classes. For details
on how SLF4J finds a logging backend, see their documentation.
Alternatively, if you instantiate the SystemLogger
with a
java.util.logging.Logger
directly, it will use that.
DEBUG, defaultLogLevelProperty, ERROR, INFO, logcategory, logLevelsProperty, SILENT, TRACE, WARNING
Constructor and Description |
---|
SystemLogger() |
SystemLogger(java.util.logging.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
debug(java.lang.String category,
java.lang.String format,
java.lang.Object... params)
Issue a debug message.
|
void |
error(java.lang.String category,
java.lang.String format,
java.lang.Object... params)
Issue an error message.
|
void |
info(java.lang.String category,
java.lang.String format,
java.lang.Object... params)
Issue an informational message.
|
void |
trace(java.lang.String category,
java.lang.String format,
java.lang.Object... params)
Issue a trace message.
|
void |
warn(java.lang.String category,
java.lang.String format,
java.lang.Object... params)
Issue a warning message.
|
clearLogLevels, getDefaultLogLevel, getLogCategories, getLogLevel, readSystemProperties, setDefaultLogLevel, setDefaultLogLevel, setLogLevel, setLogLevel, setLogLevels
public SystemLogger()
public SystemLogger(java.util.logging.Logger logger)
public void error(java.lang.String category, java.lang.String format, java.lang.Object... params)
Logger
public void warn(java.lang.String category, java.lang.String format, java.lang.Object... params)
Logger
public void info(java.lang.String category, java.lang.String format, java.lang.Object... params)
Logger
public void debug(java.lang.String category, java.lang.String format, java.lang.Object... params)
Logger