|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.log.Slf4JLoggerImpl
public class Slf4JLoggerImpl
Platform SDK Commons Logger implementation which sends PSDK internal logs to Slf4j logging interface.
Slf4JLoggerFactoryImpl
Field Summary | |
---|---|
static Marker |
PSDK_FATAL_MESSAGE_MARKER
|
static Marker |
PSDK_INT_MESSAGE_MARKER
|
static Marker |
PSDK_MESSAGE_MARKER
|
Constructor Summary | |
---|---|
Slf4JLoggerImpl(Logger impl)
|
Method Summary | |
---|---|
ILogger |
createChildLogger(java.lang.String name)
Creates new child logger. |
void |
debug(java.lang.Object message)
Logs a message at the DEBUG level. |
void |
debug(java.lang.Object message,
java.lang.Throwable thr)
Logs a message at the DEBUG level including the stack trace of the Throwable
thr passed as parameter. |
void |
debugFormat(java.lang.String message,
java.lang.Object args)
Logs formatted debug message with optional arguments. |
void |
error(java.lang.Object message)
Logs a message at the ERROR level. |
void |
error(java.lang.Object message,
java.lang.Throwable thr)
Logs a message at the ERROR level including the stack trace of the Throwable
thr passed as parameter. |
void |
errorFormat(java.lang.String message,
java.lang.Object args)
Logs a message at the ERROR level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
void |
fatalError(java.lang.Object message)
Logs a message object with the FATAL ERROR level. |
void |
fatalError(java.lang.Object message,
java.lang.Throwable thr)
Logs a message at the FATAL ERROR level including the stack trace of the Throwable
thr passed as parameter. |
void |
fatalErrorFormat(java.lang.String message,
java.lang.Object args)
Logs a message at the FATAL ERROR level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
void |
info(java.lang.Object message)
Logs a message at the INFO level. |
void |
info(java.lang.Object message,
java.lang.Throwable thr)
Logs a message at the INFO level including the stack trace of the Throwable
thr passed as parameter. |
void |
infoFormat(java.lang.String message,
java.lang.Object args)
Logs a message at the INFO level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
boolean |
isDebug()
Checks whether this Logger is enabled for the DEBUG Level. |
boolean |
isError()
Checks whether this Logger is enabled for the ERROR Level. |
boolean |
isFatalError()
Checks whether this Logger is enabled for the FATAL ERROR level. |
boolean |
isInfo()
Checks whether this Logger is enabled for the INFO Level. |
boolean |
isWarn()
Checks whether this Logger is enabled for the WARNING Level. |
void |
warn(java.lang.Object message)
Logs a message at the WARNING level. |
void |
warn(java.lang.Object message,
java.lang.Throwable thr)
Logs a message at the WARNING level including the stack trace of the Throwable
thr passed as parameter. |
void |
warnFormat(java.lang.String message,
java.lang.Object args)
Logs a message at the WARNING level.To format log messages PSDK uses MessageFormat class.Quick examples on the rules of formatting:
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Marker PSDK_MESSAGE_MARKER
public static final Marker PSDK_INT_MESSAGE_MARKER
public static final Marker PSDK_FATAL_MESSAGE_MARKER
Constructor Detail |
---|
public Slf4JLoggerImpl(Logger impl)
Method Detail |
---|
public boolean isFatalError()
ILogger
FATAL ERROR
level.
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).
isFatalError
in interface ILogger
true
if this Logger is enabled for level FATAL ERROR
,
false
otherwise.public void fatalError(java.lang.Object message)
ILogger
FATAL ERROR
level.
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).
fatalError
in interface ILogger
message
- the message to log.public void fatalError(java.lang.Object message, java.lang.Throwable thr)
ILogger
FATAL ERROR
level including the stack trace of the Throwable
thr
passed as parameter.
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).
fatalError
in interface ILogger
message
- the message object to log.thr
- the exception to log, including its stack trace.public void fatalErrorFormat(java.lang.String message, java.lang.Object args)
ILogger
FATAL ERROR
level.MessageFormat
class.
log.fatalErrorFormat("Value is ''{0}''", new Integer(1));
log.fatalErrorFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
Note: Some of PSDK supported logging frameworks (namely "Slf4J
"
and "java.util.logging
") do not support FATAL ERROR
messages level.Slf4J
logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.java.util.logging
adapter this level is processed as ERROR
(SEVERE
).
fatalErrorFormat
in interface ILogger
message
- the message to log.args
- parameters to the message.MessageFormat
public boolean isError()
ILogger
ERROR
Level.
isError
in interface ILogger
true
if this Logger is enabled for level ERROR
,
false
otherwise.public void error(java.lang.Object message)
ILogger
ERROR
level.
error
in interface ILogger
message
- the message object to log.public void error(java.lang.Object message, java.lang.Throwable thr)
ILogger
ERROR
level including the stack trace of the Throwable
thr
passed as parameter.
error
in interface ILogger
message
- the message object to log.thr
- the exception to log, including its stack trace.public void errorFormat(java.lang.String message, java.lang.Object args)
ILogger
ERROR
level.MessageFormat
class.
log.errorFormat("Value is ''{0}''", new Integer(1));
log.errorFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
errorFormat
in interface ILogger
message
- the message to log.args
- parameters to the message.MessageFormat
public boolean isWarn()
ILogger
WARNING
Level.
isWarn
in interface ILogger
true
if this Logger is enabled for level WARNING
,
false
otherwise.public void warn(java.lang.Object message)
ILogger
WARNING
level.
warn
in interface ILogger
message
- the message object to log.public void warn(java.lang.Object message, java.lang.Throwable thr)
ILogger
WARNING
level including the stack trace of the Throwable
thr
passed as parameter.
warn
in interface ILogger
message
- the message object to log.thr
- the exception to log, including its stack trace.public void warnFormat(java.lang.String message, java.lang.Object args)
ILogger
WARNING
level.MessageFormat
class.
log.warnFormat("Value is ''{0}''", new Integer(1));
log.warnFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
warnFormat
in interface ILogger
message
- the message to log.args
- parameters to the message.MessageFormat
public boolean isInfo()
ILogger
INFO
Level.
isInfo
in interface ILogger
true
if this Logger is enabled for level INFO
,
false
otherwise.public void info(java.lang.Object message)
ILogger
INFO
level.
info
in interface ILogger
message
- the message object to log.public void info(java.lang.Object message, java.lang.Throwable thr)
ILogger
INFO
level including the stack trace of the Throwable
thr
passed as parameter.
info
in interface ILogger
message
- the message object to log.thr
- the exception to log, including its stack trace.public void infoFormat(java.lang.String message, java.lang.Object args)
ILogger
INFO
level.MessageFormat
class.
log.infoFormat("Value is ''{0}''", new Integer(1));
log.infoFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
infoFormat
in interface ILogger
message
- the message to log.args
- parameters to the message.MessageFormat
public boolean isDebug()
ILogger
DEBUG
Level.
isDebug
in interface ILogger
true
if this Logger is enabled for level DEBUG
,
false
otherwise.public void debug(java.lang.Object message)
ILogger
DEBUG
level.
debug
in interface ILogger
message
- the message object to log.public void debug(java.lang.Object message, java.lang.Throwable thr)
ILogger
DEBUG
level including the stack trace of the Throwable
thr
passed as parameter.
debug
in interface ILogger
message
- the message object to log.thr
- the exception to log, including its stack trace.public void debugFormat(java.lang.String message, java.lang.Object args)
ILogger
MessageFormat
class.
log.debugFormat("Value is ''{0}''", new Integer(1));
log.debugFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
debugFormat
in interface ILogger
message
- message with format tagsargs
- arguments for formatMessageFormat
public ILogger createChildLogger(java.lang.String name)
ILogger
[this-logger-name].[child-name]
".
createChildLogger
in interface ILogger
name
- the child name for the new logger
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |