Package ch.ivyteam.log
Interface ILogger
- All Known Implementing Classes:
Logger
public interface ILogger
API for logging messages with different levels. The most methods are able to
handle a formated
message
and a variable number of
parameters.
The following example shows the possibilities of MessageFormat
:
The log output with different values forinfo("The disk \"{0}\" contains ''{1}'' file(s).", "MyDisk", 27);
fileCount
:
SeeThe disk "MyDisk" contains '27' file(s).
MessageFormat
fore more details.- Since:
- 10.01.2011
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Formats and logs a message with level DEBUG.void
Formats and logs a message with level DEBUG.void
Logs a message with level ERROR.void
Formats and logs a message with level ERROR.void
Formats and logs a message with level ERROR.void
Formats and logs a message with level FATAL.void
Formats and logs a message with level FATAL.void
Logs a message with level INFO.void
Formats(java.text.MessageFormat) and logs a message with level INFO.void
Formats(java.text.MessageFormat) and logs a message with level INFO including a throwable.void
Formats(java.text.MessageFormat) and logs a message.void
Formats(java.text.MessageFormat) and logs a message.void
Logs a message with level WARN.void
Formats and logs a message with level WARNING.void
Formats and logs a message with level WARNING.
-
Method Details
-
debug
Formats and logs a message with level DEBUG.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in Java.
-
debug
Formats and logs a message with level DEBUG.- Parameters:
formatedMessage
- message including format tokens '{}'throwable
- e.g. includes the exceptionargs
- token content- API:
- This public API is available in Java.
-
info
Logs a message with level INFO.- Parameters:
message
- if the message is anThrowable
the stack trace is also logged.- API:
- This public API is available in Java.
-
info
Formats(java.text.MessageFormat) and logs a message with level INFO.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in Java.
-
info
Formats(java.text.MessageFormat) and logs a message with level INFO including a throwable.- Parameters:
formatedMessage
- message including format tokens '{}'throwable
- e.g. includes the exceptionargs
- token content- API:
- This public API is available in Java.
-
warn
Logs a message with level WARN.- Parameters:
message
- if the message is anThrowable
the stack trace is also logged.- API:
- This public API is available in Java.
-
warn
Formats and logs a message with level WARNING.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in Java.
-
warn
Formats and logs a message with level WARNING.- Parameters:
formatedMessage
- message including format tokens '{}'throwable
- e.g. includes the exceptionargs
- token content- API:
- This public API is available in Java.
-
error
Logs a message with level ERROR.- Parameters:
message
- if the message is anThrowable
the stack trace is also logged- API:
- This public API is available in Java.
-
error
Formats and logs a message with level ERROR.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in Java.
-
error
Formats and logs a message with level ERROR.- Parameters:
formatedMessage
- message including format tokens '{}'throwable
- e.g. includes the exceptionargs
- token content- API:
- This public API is available in Java.
-
fatal
Formats and logs a message with level FATAL.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in Java.
-
fatal
Formats and logs a message with level FATAL.- Parameters:
formatedMessage
- message including format tokens '{}'throwable
- e.g. includes the exceptionargs
- token content- API:
- This public API is available in Java.
-
log
Formats(java.text.MessageFormat) and logs a message. Example: log("My {0} Message with {1} tokens.", "first", 2); --> log result: "My first Message with 2 tokens." After formating it calls the log method of org.apache.log4j.Logger- Parameters:
level
- logging level seePriority
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in Java.
-
log
void log(org.apache.log4j.Priority level, String formatedMessage, Throwable throwable, Object... args) Formats(java.text.MessageFormat) and logs a message. Including a Throwable Object.- Parameters:
level
- logging level seePriority
formatedMessage
- message including format tokens '{}'throwable
- e.g. includes the exceptionargs
- token content- API:
- This public API is available in Java.
-