|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILogger
This is a facade for the Platform SDK Commons logging subsystem.
It offers a simplified interface that follows the inversion of control pattern
and a simplified priority/level/severity abstraction.
Quick examples:
For more details on message formatting, refer to
log.debugFormat("Value is ''{0}''", new Integer(1));
log.debugFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
MessageFormat
class documentation.
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:
|
Method Detail |
---|
boolean isDebug()
DEBUG
Level.
true
if this Logger is enabled for level DEBUG
,
false
otherwise.void debug(java.lang.Object message)
DEBUG
level.
message
- the message object to log.void debug(java.lang.Object message, java.lang.Throwable thr)
DEBUG
level including the stack trace of the Throwable
thr
passed as parameter.
message
- the message object to log.thr
- the exception to log, including its stack trace.void debugFormat(java.lang.String message, java.lang.Object args)
MessageFormat
class.
log.debugFormat("Value is ''{0}''", new Integer(1));
log.debugFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
message
- message with format tagsargs
- arguments for formatMessageFormat
boolean isInfo()
INFO
Level.
true
if this Logger is enabled for level INFO
,
false
otherwise.void info(java.lang.Object message)
INFO
level.
message
- the message object to log.void info(java.lang.Object message, java.lang.Throwable thr)
INFO
level including the stack trace of the Throwable
thr
passed as parameter.
message
- the message object to log.thr
- the exception to log, including its stack trace.void infoFormat(java.lang.String message, java.lang.Object args)
INFO
level.MessageFormat
class.
log.infoFormat("Value is ''{0}''", new Integer(1));
log.infoFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
message
- the message to log.args
- parameters to the message.MessageFormat
boolean isError()
ERROR
Level.
true
if this Logger is enabled for level ERROR
,
false
otherwise.void error(java.lang.Object message)
ERROR
level.
message
- the message object to log.void error(java.lang.Object message, java.lang.Throwable thr)
ERROR
level including the stack trace of the Throwable
thr
passed as parameter.
message
- the message object to log.thr
- the exception to log, including its stack trace.void errorFormat(java.lang.String message, java.lang.Object args)
ERROR
level.MessageFormat
class.
log.errorFormat("Value is ''{0}''", new Integer(1));
log.errorFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
message
- the message to log.args
- parameters to the message.MessageFormat
boolean isFatalError()
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
).
true
if this Logger is enabled for level FATAL ERROR
,
false
otherwise.void fatalError(java.lang.Object message)
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
).
message
- the message to log.void fatalError(java.lang.Object message, java.lang.Throwable thr)
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
).
message
- the message object to log.thr
- the exception to log, including its stack trace.void fatalErrorFormat(java.lang.String message, java.lang.Object args)
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
).
message
- the message to log.args
- parameters to the message.MessageFormat
boolean isWarn()
WARNING
Level.
true
if this Logger is enabled for level WARNING
,
false
otherwise.void warn(java.lang.Object message)
WARNING
level.
message
- the message object to log.void warn(java.lang.Object message, java.lang.Throwable thr)
WARNING
level including the stack trace of the Throwable
thr
passed as parameter.
message
- the message object to log.thr
- the exception to log, including its stack trace.void warnFormat(java.lang.String message, java.lang.Object args)
WARNING
level.MessageFormat
class.
log.warnFormat("Value is ''{0}''", new Integer(1));
log.warnFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});
message
- the message to log.args
- parameters to the message.MessageFormat
ILogger createChildLogger(java.lang.String name)
[this-logger-name].[child-name]
".
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 |