Package org.djutils.logger
Class CategoryLogger.DelegateLogger
java.lang.Object
org.djutils.logger.CategoryLogger.DelegateLogger
- Enclosing class:
- CategoryLogger
public static class CategoryLogger.DelegateLogger extends Object
DelegateLogger class that takes care of actually logging the message and/or exception.
Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
- Author:
- Alexander Verbraeck
-
Constructor Summary
Constructors Constructor Description DelegateLogger(boolean log)
-
Method Summary
Modifier and Type Method Description void
debug(Object object)
Create a debug log entry that will always be output, independent of LogCategory settings.void
debug(String message)
Create a debug log entry that will always be output, independent of LogCategory settings.void
debug(String message, Object... arguments)
Create a debug log entry that will always be output, independent of LogCategory settings.void
debug(Throwable exception)
Create a debug log entry that will always be output, independent of LogCategory settings.void
debug(Throwable exception, String message)
Create a debug log entry that will always be output, independent of LogCategory settings.void
debug(Throwable exception, String message, Object... arguments)
Create a debug log entry that will always be output, independent of LogCategory settings.void
error(Object object)
Create a error log entry that will always be output, independent of LogCategory settings.void
error(String message)
Create a error log entry that will always be output, independent of LogCategory settings.void
error(String message, Object... arguments)
Create a error log entry that will always be output, independent of LogCategory settings.void
error(Throwable exception)
Create a error log entry that will always be output, independent of LogCategory settings.void
error(Throwable exception, String message)
Create a error log entry that will always be output, independent of LogCategory settings.void
error(Throwable exception, String message, Object... arguments)
Create a error log entry that will always be output, independent of LogCategory settings.void
info(Object object)
Create a info log entry that will always be output, independent of LogCategory settings.void
info(String message)
Create a info log entry that will always be output, independent of LogCategory settings.void
info(String message, Object... arguments)
Create a info log entry that will always be output, independent of LogCategory settings.void
info(Throwable exception)
Create a info log entry that will always be output, independent of LogCategory settings.void
info(Throwable exception, String message)
Create a info log entry that will always be output, independent of LogCategory settings.void
info(Throwable exception, String message, Object... arguments)
Create a info log entry that will always be output, independent of LogCategory settings.void
trace(Object object)
Create a trace log entry that will always be output, independent of LogCategory settings.void
trace(String message)
Create a trace log entry that will always be output, independent of LogCategory settings.void
trace(String message, Object... arguments)
Create a trace log entry that will always be output, independent of LogCategory settings.void
trace(Throwable exception)
Create a trace log entry that will always be output, independent of LogCategory settings.void
trace(Throwable exception, String message)
Create a trace log entry that will always be output, independent of LogCategory settings.void
trace(Throwable exception, String message, Object... arguments)
Create a trace log entry that will always be output, independent of LogCategory settings.void
warn(Object object)
Create a warn log entry that will always be output, independent of LogCategory settings.void
warn(String message)
Create a warn log entry that will always be output, independent of LogCategory settings.void
warn(String message, Object... arguments)
Create a warn log entry that will always be output, independent of LogCategory settings.void
warn(Throwable exception)
Create a warn log entry that will always be output, independent of LogCategory settings.void
warn(Throwable exception, String message)
Create a warn log entry that will always be output, independent of LogCategory settings.void
warn(Throwable exception, String message, Object... arguments)
Create a warn log entry that will always be output, independent of LogCategory settings.CategoryLogger.DelegateLogger
when(boolean condition)
The conditional filter that will result in the usage of a DelegateLogger.CategoryLogger.DelegateLogger
when(BooleanSupplier supplier)
The conditional filter that will result in the usage of a DelegateLogger.
-
Constructor Details
-
DelegateLogger
public DelegateLogger(boolean log)- Parameters:
log
- boolean; indicate whether we should log or not.
-
-
Method Details
-
when
The conditional filter that will result in the usage of a DelegateLogger.- Parameters:
condition
- boolean; the condition that should be evaluated- Returns:
- the logger that further processes logging (DelegateLogger)
-
when
The conditional filter that will result in the usage of a DelegateLogger.- Parameters:
supplier
- BooleanSupplier; the function evaluating the condition- Returns:
- the logger that further processes logging (DelegateLogger)
-
trace
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
object
- Object; the result of thetoString()
method ofobject
will be logged
-
trace
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to log
-
trace
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to be logged, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
trace
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to log
-
trace
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log
-
trace
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
debug
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
object
- Object; the result of thetoString()
method ofobject
will be logged
-
debug
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to log
-
debug
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to be logged, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
debug
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to log
-
debug
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log
-
debug
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
info
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
object
- Object; the result of thetoString()
method ofobject
will be logged
-
info
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to log
-
info
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to be logged, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
info
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to log
-
info
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log
-
info
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
warn
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
object
- Object; the result of thetoString()
method ofobject
will be logged
-
warn
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to log
-
warn
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to be logged, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
warn
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to log
-
warn
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log
-
warn
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
error
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
object
- Object; the result of thetoString()
method ofobject
will be logged
-
error
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to log
-
error
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
message
- String; the message to be logged, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-
error
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to log
-
error
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log
-
error
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
exception
- Throwable; the exception to logmessage
- String; the message to log, where {} entries will be replaced by argumentsarguments
- Object...; the arguments to substitute for the {} entries in the message string
-