Package org.pipservices3.components.log
Interface ILogger
- All Known Implementing Classes:
CachedLogger,CompositeLogger,ConsoleLogger,DiagnosticsLogger,Logger,NullLogger
public interface ILogger
Interface for logger components that capture execution log messages.
-
Method Summary
Modifier and Type Method Description voiddebug(String correlationId, String message, Object... args)Logs a high-level debug information for troubleshooting.voiderror(String correlationId, Exception error)Logs recoverable application error.voiderror(String correlationId, Exception error, String message, Object... args)Logs recoverable application error.voiderror(String correlationId, String message, Object... args)Logs recoverable application error.voidfatal(String correlationId, Exception error)Logs fatal (unrecoverable) message that caused the process to crash.voidfatal(String correlationId, Exception error, String message, Object... args)Logs fatal (unrecoverable) message that caused the process to crash.voidfatal(String correlationId, String message, Object... args)Logs fatal (unrecoverable) message that caused the process to crash.LogLevelgetLevel()Gets the maximum log level.voidinfo(String correlationId, String message, Object... args)Logs an important information messagevoidlog(LogLevel level, String correlationId, Exception error, String message, Object... args)Logs a message at specified log level.voidsetLevel(LogLevel value)Set the maximum log level.voidtrace(String correlationId, String message, Object... args)Logs a low-level debug information for troubleshooting.voidwarn(String correlationId, String message, Object... args)Logs a warning that may or may not have a negative impact.
-
Method Details
-
getLevel
LogLevel getLevel()Gets the maximum log level. Messages with higher log level are filtered out.- Returns:
- the maximum log level.
-
setLevel
Set the maximum log level.- Parameters:
value- a new maximum log level.
-
log
Logs a message at specified log level.- Parameters:
level- a log level.correlationId- (optional) transaction id to trace execution through call chain.error- an error object associated with this message.message- a human-readable message to log.args- arguments to parameterize the message.
-
fatal
Logs fatal (unrecoverable) message that caused the process to crash.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.message- a human-readable message to log.args- arguments to parameterize the message.
-
fatal
Logs fatal (unrecoverable) message that caused the process to crash.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.error- an error object associated with this message.
-
fatal
Logs fatal (unrecoverable) message that caused the process to crash.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.error- an error object associated with this message.message- a human-readable message to log.args- arguments to parameterize the message.
-
error
Logs recoverable application error.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.message- a human-readable message to log.args- arguments to parameterize the message.
-
error
Logs recoverable application error.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.error- an error object associated with this message.
-
error
Logs recoverable application error.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.error- an error object associated with this message.message- a human-readable message to log.args- arguments to parameterize the message.
-
warn
Logs a warning that may or may not have a negative impact.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.message- a human-readable message to log.args- arguments to parameterize the message.
-
info
Logs an important information message- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.message- a human-readable message to log.args- arguments to parameterize the message.
-
debug
Logs a high-level debug information for troubleshooting.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.message- a human-readable message to log.args- arguments to parameterize the message.
-
trace
Logs a low-level debug information for troubleshooting.- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.message- a human-readable message to log.args- arguments to parameterize the message.
-