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-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.- Author:
- Alexander Verbraeck
-
-
Constructor Summary
Constructors Constructor Description DelegateLogger(boolean log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(Object object)Create a debug log entry that will always be output, independent of LogCategory settings.voiddebug(String message)Create a debug log entry that will always be output, independent of LogCategory settings.voiddebug(String message, Object... arguments)Create a debug log entry that will always be output, independent of LogCategory settings.voiddebug(Throwable exception)Create a debug log entry that will always be output, independent of LogCategory settings.voiddebug(Throwable exception, String message)Create a debug log entry that will always be output, independent of LogCategory settings.voiddebug(Throwable exception, String message, Object... arguments)Create a debug log entry that will always be output, independent of LogCategory settings.voiderror(Object object)Create a error log entry that will always be output, independent of LogCategory settings.voiderror(String message)Create a error log entry that will always be output, independent of LogCategory settings.voiderror(String message, Object... arguments)Create a error log entry that will always be output, independent of LogCategory settings.voiderror(Throwable exception)Create a error log entry that will always be output, independent of LogCategory settings.voiderror(Throwable exception, String message)Create a error log entry that will always be output, independent of LogCategory settings.voiderror(Throwable exception, String message, Object... arguments)Create a error log entry that will always be output, independent of LogCategory settings.voidinfo(Object object)Create a info log entry that will always be output, independent of LogCategory settings.voidinfo(String message)Create a info log entry that will always be output, independent of LogCategory settings.voidinfo(String message, Object... arguments)Create a info log entry that will always be output, independent of LogCategory settings.voidinfo(Throwable exception)Create a info log entry that will always be output, independent of LogCategory settings.voidinfo(Throwable exception, String message)Create a info log entry that will always be output, independent of LogCategory settings.voidinfo(Throwable exception, String message, Object... arguments)Create a info log entry that will always be output, independent of LogCategory settings.voidtrace(Object object)Create a trace log entry that will always be output, independent of LogCategory settings.voidtrace(String message)Create a trace log entry that will always be output, independent of LogCategory settings.voidtrace(String message, Object... arguments)Create a trace log entry that will always be output, independent of LogCategory settings.voidtrace(Throwable exception)Create a trace log entry that will always be output, independent of LogCategory settings.voidtrace(Throwable exception, String message)Create a trace log entry that will always be output, independent of LogCategory settings.voidtrace(Throwable exception, String message, Object... arguments)Create a trace log entry that will always be output, independent of LogCategory settings.voidwarn(Object object)Create a warn log entry that will always be output, independent of LogCategory settings.voidwarn(String message)Create a warn log entry that will always be output, independent of LogCategory settings.voidwarn(String message, Object... arguments)Create a warn log entry that will always be output, independent of LogCategory settings.voidwarn(Throwable exception)Create a warn log entry that will always be output, independent of LogCategory settings.voidwarn(Throwable exception, String message)Create a warn log entry that will always be output, independent of LogCategory settings.voidwarn(Throwable exception, String message, Object... arguments)Create a warn log entry that will always be output, independent of LogCategory settings.CategoryLogger.DelegateLoggerwhen(boolean condition)The conditional filter that will result in the usage of a DelegateLogger.CategoryLogger.DelegateLoggerwhen(BooleanSupplier supplier)The conditional filter that will result in the usage of a DelegateLogger.
-
-
-
Method Detail
-
when
public CategoryLogger.DelegateLogger when(boolean condition)
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
public CategoryLogger.DelegateLogger when(BooleanSupplier supplier)
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
public void trace(Object object)
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
object- Object; the result of thetoString()method ofobjectwill be logged
-
trace
public void trace(String message)
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
message- String; the message to log
-
trace
public void trace(String message, Object... arguments)
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
public void trace(Throwable exception)
Create a trace log entry that will always be output, independent of LogCategory settings.- Parameters:
exception- Throwable; the exception to log
-
trace
public void trace(Throwable exception, String message)
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
public void trace(Throwable exception, String message, Object... arguments)
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
public void debug(Object object)
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
object- Object; the result of thetoString()method ofobjectwill be logged
-
debug
public void debug(String message)
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
message- String; the message to log
-
debug
public void debug(String message, Object... arguments)
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
public void debug(Throwable exception)
Create a debug log entry that will always be output, independent of LogCategory settings.- Parameters:
exception- Throwable; the exception to log
-
debug
public void debug(Throwable exception, String message)
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
public void debug(Throwable exception, String message, Object... arguments)
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
public void info(Object object)
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
object- Object; the result of thetoString()method ofobjectwill be logged
-
info
public void info(String message)
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
message- String; the message to log
-
info
public void info(String message, Object... arguments)
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
public void info(Throwable exception)
Create a info log entry that will always be output, independent of LogCategory settings.- Parameters:
exception- Throwable; the exception to log
-
info
public void info(Throwable exception, String message)
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
public void info(Throwable exception, String message, Object... arguments)
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
public void warn(Object object)
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
object- Object; the result of thetoString()method ofobjectwill be logged
-
warn
public void warn(String message)
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
message- String; the message to log
-
warn
public void warn(String message, Object... arguments)
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
public void warn(Throwable exception)
Create a warn log entry that will always be output, independent of LogCategory settings.- Parameters:
exception- Throwable; the exception to log
-
warn
public void warn(Throwable exception, String message)
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
public void warn(Throwable exception, String message, Object... arguments)
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
public void error(Object object)
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
object- Object; the result of thetoString()method ofobjectwill be logged
-
error
public void error(String message)
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
message- String; the message to log
-
error
public void error(String message, Object... arguments)
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
public void error(Throwable exception)
Create a error log entry that will always be output, independent of LogCategory settings.- Parameters:
exception- Throwable; the exception to log
-
error
public void error(Throwable exception, String message)
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
public void error(Throwable exception, String message, Object... arguments)
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
-
-