Package org.pipservices3.components.log
Class NullLogger
java.lang.Object
org.pipservices3.components.log.NullLogger
- All Implemented Interfaces:
ILogger
public class NullLogger extends Object implements ILogger
Dummy implementation of logger that doesn't do anything.
It can be used in testing or in situations when logger is required but shall be disabled.
- See Also:
ILogger
-
Constructor Summary
Constructors Constructor Description NullLogger()Creates a new instance of the logger. -
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.
-
Constructor Details
-
NullLogger
public NullLogger()Creates a new instance of the logger.
-
-
Method Details
-
getLevel
Gets the maximum log level. Messages with higher log level are filtered out. -
setLevel
Set the maximum log level. -
log
public void log(LogLevel level, String correlationId, Exception error, String message, Object... args)Logs a message at specified log level. -
fatal
Logs fatal (unrecoverable) message that caused the process to crash. -
fatal
Logs fatal (unrecoverable) message that caused the process to crash. -
fatal
Logs fatal (unrecoverable) message that caused the process to crash. -
error
Logs recoverable application error. -
error
Logs recoverable application error. -
error
Logs recoverable application error. -
warn
Logs a warning that may or may not have a negative impact. -
info
Logs an important information message -
debug
Logs a high-level debug information for troubleshooting. -
trace
Logs a low-level debug information for troubleshooting.
-