public class LoggerFactory
extends java.lang.Object
LoggerFactory
, with additional useful
methods.Constructor and Description |
---|
LoggerFactory() |
Modifier and Type | Method and Description |
---|---|
static java.io.OutputStream |
getDebugOutputStream(org.slf4j.Logger logger)
Returns a
OutputStream whose close and flush methods write its unformatted data as a debug message to logger. |
static java.io.OutputStream |
getDebugOutputStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
OutputStream whose close and flush methods write its unformatted data as a debug message to logger. |
static java.io.PrintStream |
getDebugPrintStream(org.slf4j.Logger logger)
Returns a
PrintStream whose close and flush methods write its formatted text as a debug message to logger. |
static java.io.PrintStream |
getDebugPrintStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
PrintStream whose close and flush methods write its structured text as a debug message to logger. |
static java.io.OutputStream |
getErrorOutputStream(org.slf4j.Logger logger)
Returns a
OutputStream whose close and flush methods write its unformatted data as an error message to logger. |
static java.io.OutputStream |
getErrorOutputStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
OutputStream whose close and flush methods write its unformatted data as an error message to logger. |
static java.io.PrintStream |
getErrorPrintStream(org.slf4j.Logger logger)
Returns a
PrintStream whose close and flush methods write its formatted text as an error message to logger. |
static java.io.PrintStream |
getErrorPrintStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
PrintStream whose close and flush methods write its structured text as an error message to logger. |
static java.io.OutputStream |
getInfoOutputStream(org.slf4j.Logger logger)
Returns a
OutputStream whose close and flush methods write its unformatted data as an information message to logger. |
static java.io.OutputStream |
getInfoOutputStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
OutputStream whose close and flush methods write its unformatted data as an information message to logger. |
static java.io.PrintStream |
getInfoPrintStream(org.slf4j.Logger logger)
Returns a
PrintStream whose close and flush methods write its formatted text as an information message to logger. |
static java.io.PrintStream |
getInfoPrintStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
PrintStream whose close and flush methods write its structured text as an information message to logger. |
static org.slf4j.Logger |
getLogger(java.lang.Class<?> clazz)
Returns a logger named according to the class passed as parameter, using
the statically bound
ILoggerFactory instance. |
static org.slf4j.Logger |
getLogger(java.lang.Class<?> clazz,
java.lang.String name)
Returns a separate logger named according to a parent logger and the operation or feature,
using the statically bound
ILoggerFactory instance. |
static org.slf4j.Logger |
getLogger(org.slf4j.Logger logger,
java.lang.String name)
Returns a separate logger named according to a parent logger and the operation or feature,
using the statically bound
ILoggerFactory instance. |
static org.slf4j.Logger |
getLogger(java.lang.String name)
Returns a logger named according to the name parameter using the
statically bound
ILoggerFactory instance. |
static java.io.OutputStream |
getTraceOutputStream(org.slf4j.Logger logger)
Returns a
OutputStream whose close and flush methods write its unformatted data as a trace message to logger. |
static java.io.OutputStream |
getTraceOutputStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
OutputStream whose close and flush methods write its unformatted data as a trace message to logger. |
static java.io.PrintStream |
getTracePrintStream(org.slf4j.Logger logger)
Returns a
PrintStream whose close and flush methods write its formatted text as a trace message to logger. |
static java.io.PrintStream |
getTracePrintStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
PrintStream whose close and flush methods write its structured text as a trace message to logger. |
static java.io.OutputStream |
getWarnOutputStream(org.slf4j.Logger logger)
Returns a
OutputStream whose close and flush methods write its unformatted data as a warning message to logger. |
static java.io.OutputStream |
getWarnOutputStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
OutputStream whose close and flush methods write its unformatted data as a warning message to logger. |
static java.io.PrintStream |
getWarnPrintStream(org.slf4j.Logger logger)
Returns a
PrintStream whose close and flush methods write its formatted text as a warning message to logger. |
static java.io.PrintStream |
getWarnPrintStream(org.slf4j.Logger logger,
java.lang.String name)
Returns a
PrintStream whose close and flush methods write its structured text as a warning message to logger. |
public static org.slf4j.Logger getLogger(java.lang.String name)
ILoggerFactory
instance. Equivalent to
LoggerFactory.getLogger(String)
.
Recommended to get a special purpose logger defined by the application, whose name does not follow the fully qualified name convention and that tracks some globally available feature.
name
- The name of the logger.public static org.slf4j.Logger getLogger(java.lang.Class<?> clazz)
ILoggerFactory
instance.
Recommended to get a logger that tracks features provided by the class.
clazz
- the returned logger will be named after clazzpublic static org.slf4j.Logger getLogger(java.lang.Class<?> clazz, java.lang.String name)
ILoggerFactory
instance.
Recommended to get a logger subordinated to an existing logger.
clazz
- the returned logger will be named after clazzname
- the name of operation or feature appended to the parent logger name.public static org.slf4j.Logger getLogger(org.slf4j.Logger logger, java.lang.String name)
ILoggerFactory
instance.
Recommended to get a logger subordinated to an existing logger.
logger
- the returned logger will be named after this parent loggername
- the name of operation or feature appended to the parent logger name.public static java.io.PrintStream getTracePrintStream(org.slf4j.Logger logger)
PrintStream
whose close and flush methods write its formatted text as a trace message to logger.logger
- the logger text is reported to.public static java.io.PrintStream getDebugPrintStream(org.slf4j.Logger logger)
PrintStream
whose close and flush methods write its formatted text as a debug message to logger.logger
- the logger text is reported to.public static java.io.PrintStream getInfoPrintStream(org.slf4j.Logger logger)
PrintStream
whose close and flush methods write its formatted text as an information message to logger.logger
- the logger text is reported to.public static java.io.PrintStream getWarnPrintStream(org.slf4j.Logger logger)
PrintStream
whose close and flush methods write its formatted text as a warning message to logger.logger
- the logger text is reported to.public static java.io.PrintStream getErrorPrintStream(org.slf4j.Logger logger)
PrintStream
whose close and flush methods write its formatted text as an error message to logger.logger
- the logger text is reported to.public static java.io.OutputStream getTraceOutputStream(org.slf4j.Logger logger)
OutputStream
whose close and flush methods write its unformatted data as a trace message to logger.logger
- the logger data is reported to.public static java.io.OutputStream getDebugOutputStream(org.slf4j.Logger logger)
OutputStream
whose close and flush methods write its unformatted data as a debug message to logger.logger
- the logger data is reported to.public static java.io.OutputStream getInfoOutputStream(org.slf4j.Logger logger)
OutputStream
whose close and flush methods write its unformatted data as an information message to logger.logger
- the logger data is reported to.public static java.io.OutputStream getWarnOutputStream(org.slf4j.Logger logger)
OutputStream
whose close and flush methods write its unformatted data as a warning message to logger.logger
- the logger data is reported to.public static java.io.OutputStream getErrorOutputStream(org.slf4j.Logger logger)
OutputStream
whose close and flush methods write its unformatted data as an error message to logger.logger
- the logger data is reported to.public static java.io.PrintStream getTracePrintStream(org.slf4j.Logger logger, java.lang.String name)
PrintStream
whose close and flush methods write its structured text as a trace message to logger.
Shortcut to getTracePrintStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger text is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.PrintStream getDebugPrintStream(org.slf4j.Logger logger, java.lang.String name)
PrintStream
whose close and flush methods write its structured text as a debug message to logger.
Shortcut to getDebugPrintStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger text is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.PrintStream getInfoPrintStream(org.slf4j.Logger logger, java.lang.String name)
PrintStream
whose close and flush methods write its structured text as an information message to logger.
Shortcut to getInfoPrintStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger text is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.PrintStream getWarnPrintStream(org.slf4j.Logger logger, java.lang.String name)
PrintStream
whose close and flush methods write its structured text as a warning message to logger.
Shortcut to getWarnPrintStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger text is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.PrintStream getErrorPrintStream(org.slf4j.Logger logger, java.lang.String name)
PrintStream
whose close and flush methods write its structured text as an error message to logger.
Shortcut to getErrorPrintStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger text is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.OutputStream getTraceOutputStream(org.slf4j.Logger logger, java.lang.String name)
OutputStream
whose close and flush methods write its unformatted data as a trace message to logger.
Shortcut to getTraceOutputStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger data is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.OutputStream getDebugOutputStream(org.slf4j.Logger logger, java.lang.String name)
OutputStream
whose close and flush methods write its unformatted data as a debug message to logger.
Shortcut to getDebugOutputStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger data is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.OutputStream getInfoOutputStream(org.slf4j.Logger logger, java.lang.String name)
OutputStream
whose close and flush methods write its unformatted data as an information message to logger.
Shortcut to getInfoOutputStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger data is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.OutputStream getWarnOutputStream(org.slf4j.Logger logger, java.lang.String name)
OutputStream
whose close and flush methods write its unformatted data as a warning message to logger.
Shortcut to getWarnOutputStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger data is reported to.name
- the name of operation or feature appended to the logger name.public static java.io.OutputStream getErrorOutputStream(org.slf4j.Logger logger, java.lang.String name)
OutputStream
whose close and flush methods write its unformatted data as an error message to logger.
unformatted data as a error level message to to the logger.
Shortcut to getErrorOutputStream(LoggerFactory.getLogger(logger, name))
.logger
- the logger data is reported to.name
- the name of operation or feature appended to the logger name.