Package com.restfb.logging
Class RestFBLogger
java.lang.Object
com.restfb.logging.RestFBLogger
- Direct Known Subclasses:
JulLogger
,SLF4JLogger
Abstract class that is the parent of all our logger implementations.
Normally RestFB uses java.util.logging for logging messages. But as soon as slf4j is found on the class path RestFB switches to this logger. With the slf4j facade more logger implementations are supported and the quasi standard for java logging is used.
In the rare case you have to switch to java.util.logging although slf4j is present on the class path we provide a system property to force java.util.logging to be used.
The system property is called com.restfb.forceJUL
and can be set to true
if jul should be
forced.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final RestFBLogger
static final RestFBLogger
static final RestFBLogger
static final RestFBLogger
static final RestFBLogger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Log a message at the DEBUG level according to the specified format and arguments.abstract void
Log a message at the ERROR level according to the specified format and arguments.abstract void
Log a message at the FATAL level according to the specified format and arguments.static RestFBLogger
getLoggerInstance
(String logCategory) returns the instance of the logger that belongs to the category.abstract void
Log a message at the INFO level according to the specified format and arguments.abstract boolean
Is the logger instance enabled for the DEBUG level?abstract boolean
Is the logger instance enabled for the INFO level?abstract boolean
Is the logger instance enabled for the TRACE level?abstract void
Log a message at the TRACE level according to the specified format and arguments.abstract void
Log a message at the WARN level according to the specified format and arguments.
-
Field Details
-
HTTP_LOGGER
-
MAPPER_LOGGER
-
UTILS_LOGGER
-
CLIENT_LOGGER
-
VALUE_FACTORY_LOGGER
-
-
Constructor Details
-
RestFBLogger
public RestFBLogger()
-
-
Method Details
-
getLoggerInstance
returns the instance of the logger that belongs to the category.- Parameters:
logCategory
- the category of the logger- Returns:
- a instance of the logger
-
trace
Log a message at the TRACE level according to the specified format and arguments.- Parameters:
msg
- the log messageargs
- optional arguments, the last argument may be an exception
-
debug
Log a message at the DEBUG level according to the specified format and arguments.- Parameters:
msg
- the log messageargs
- optional arguments, the last argument may be an exception
-
info
Log a message at the INFO level according to the specified format and arguments.- Parameters:
msg
- the log messageargs
- optional arguments, the last argument may be an exception
-
warn
Log a message at the WARN level according to the specified format and arguments.- Parameters:
msg
- the log messageargs
- optional arguments, the last argument may be an exception
-
error
Log a message at the ERROR level according to the specified format and arguments.- Parameters:
msg
- the log messageargs
- optional arguments, the last argument may be an exception
-
fatal
Log a message at the FATAL level according to the specified format and arguments.- Parameters:
msg
- the log messageargs
- optional arguments, the last argument may be an exception
-
isDebugEnabled
Is the logger instance enabled for the DEBUG level?- Returns:
true
if it is enabled,false
otherwise
-
isInfoEnabled
Is the logger instance enabled for the INFO level?- Returns:
true
if it is enabled,false
otherwise
-
isTraceEnabled
Is the logger instance enabled for the TRACE level?- Returns:
true
if it is enabled,false
otherwise
-