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 formatedmessage
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
debug(String formatedMessage, Object... args)
Formats and logs a message with level DEBUG.void
debug(String formatedMessage, Throwable throwable, Object... args)
Formats and logs a message with level DEBUG.void
error(Object message)
Logs a message with level ERROR.void
error(String formatedMessage, Object... args)
Formats and logs a message with level ERROR.void
error(String formatedMessage, Throwable throwable, Object... args)
Formats and logs a message with level ERROR.void
fatal(String formatedMessage, Object... args)
Formats and logs a message with level FATAL.void
fatal(String formatedMessage, Throwable throwable, Object... args)
Formats and logs a message with level FATAL.void
info(Object message)
Logs a message with level INFO.void
info(String formatedMessage, Object... args)
Formats(java.text.MessageFormat) and logs a message with level INFO.void
info(String formatedMessage, Throwable throwable, Object... args)
Formats(java.text.MessageFormat) and logs a message with level INFO including a throwable.void
log(org.apache.log4j.Priority level, String formatedMessage, Object... args)
Formats(java.text.MessageFormat) and logs a message.void
log(org.apache.log4j.Priority level, String formatedMessage, Throwable throwable, Object... args)
Formats(java.text.MessageFormat) and logs a message.void
warn(Object message)
Logs a message with level WARN.void
warn(String formatedMessage, Object... args)
Formats and logs a message with level WARNING.void
warn(String formatedMessage, Throwable throwable, Object... args)
Formats and logs a message with level WARNING.
-
-
-
Method Detail
-
debug
void debug(String formatedMessage, Object... args)
Formats and logs a message with level DEBUG.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
debug
void debug(String formatedMessage, Throwable throwable, Object... args)
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 IvyScript and Java. It has the visibility ADVANCED.
-
info
void info(Object message)
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 IvyScript and Java. It has the visibility NOVICE.
-
info
void info(String formatedMessage, Object... args)
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 IvyScript and Java. It has the visibility NOVICE.
-
info
void info(String formatedMessage, Throwable throwable, Object... args)
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 IvyScript and Java. It has the visibility ADVANCED.
-
warn
void warn(Object message)
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 IvyScript and Java. It has the visibility NOVICE.
-
warn
void warn(String formatedMessage, Object... args)
Formats and logs a message with level WARNING.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
warn
void warn(String formatedMessage, Throwable throwable, Object... args)
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 IvyScript and Java. It has the visibility ADVANCED.
-
error
void error(Object message)
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 IvyScript and Java. It has the visibility NOVICE.
-
error
void error(String formatedMessage, Object... args)
Formats and logs a message with level ERROR.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
error
void error(String formatedMessage, Throwable throwable, Object... args)
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 IvyScript and Java. It has the visibility ADVANCED.
-
fatal
void fatal(String formatedMessage, Object... args)
Formats and logs a message with level FATAL.- Parameters:
formatedMessage
- message including format tokens '{}'args
- token content- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
fatal
void fatal(String formatedMessage, Throwable throwable, Object... args)
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 IvyScript and Java. It has the visibility ADVANCED.
-
log
void log(org.apache.log4j.Priority level, String formatedMessage, Object... args)
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 IvyScript and Java. It has the visibility ADVANCED.
-
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 IvyScript and Java. It has the visibility ADVANCED.
-
-