Interface Logger
- All Known Implementing Classes:
DefaultLogger
,NopLogger
public interface Logger
This logger interface is used to post messages to the underlying logger tool, custom logFactories can be created to
customize and target the log messages. See for more info on customization the LogFactory class.
The messages can be posted as objects so the toString function will be called only when the underlying log engine
decides to log the message.
- Since:
- 5.0
- Author:
- F. van der Meer
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.boolean
This function can be queried to choose whether to actually log certain debug statements.boolean
This function can be queried to choose whether to actually log certain error statements.boolean
This function can be queried to choose whether to actually log certain info statements.boolean
This function can be queried to choose whether to actually log certain trace statements.boolean
This function can be queried to choose whether to actually log certain warning statements.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.void
Allows an object to be logged in conjunction with a cause to the underlying logging system.
-
Method Details
-
trace
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems trace is enabled the log will be printed.- Parameters:
message
- The message to be logged.
-
debug
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems debug is enable the log will be printed.- Parameters:
message
- The message to be logged.cause
- The cause which should be printed alongside with the message.
-
debug
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems debug is enabled the log will be printed.- Parameters:
message
- The message to be logged.
-
info
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems info level is enabled the log will be printed. Info is a 'higher level' message then debug. One can expect at least info will be printed as debug is quite superfluous. Info messages are purely environmental informational and should not be used as method of 'warning' the user.- Parameters:
message
- The message to be logged.cause
- The cause which should be printed alongside with the message.
-
info
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems info level is enabled the log will be printed. Info is a 'higher level' message then debug. One can expect at least info will be printed as debug is quite superfluous. Info messages are purely environmental informational and should not be used as method of 'warning' the user.- Parameters:
message
- The message to be logged.args
- Arguments to format the message with.
-
info
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems info level is enabled the log will be printed. Info is a 'higher level' message then debug. One can expect at least info will be printed as debug is quite superfluous. Info messages are purely environmental informational and should not be used as method of 'warning' the user.- Parameters:
message
- The message to be logged.
-
warning
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems warning level is enabled the log will be printed. Warnings are important in keeping the system in healthy operation mode. As a warning may cause problems in later stages. Facts learn us that given enough time they always do. The Warning level should always be part of the output system and visible to system administrators.- Parameters:
message
- The message to be logged.cause
- The cause which should be printed alongside with the message.
-
warning
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems warning level is enabled the log will be printed. Warnings are important in keeping the system in healthy operation mode. As a warning may cause problems in later stages. Facts learn us that given enough time they always do. The Warning level should always be part of the output system and visible to system administrators.- Parameters:
message
- The message to be logged.
-
error
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems error level is enabled the log will be printed. Errors are important in keeping the system running. In case of error the system is (or will be in danger of) crashing. The Error level should always be part of the output system and visible to system administrators.- Parameters:
message
- The message to be logged.cause
- The cause which should be printed alongside with the message.
-
error
Allows an object to be logged in conjunction with a cause to the underlying logging system. If the logging systems error level is enabled the log will be printed. Errors are important in keeping the system running. In case of error the system is (or will be in danger of) crashing. The Error level should always be part of the output system and visible to system administrators.- Parameters:
message
- The message to be logged.
-
isTraceEnabled
boolean isTraceEnabled()This function can be queried to choose whether to actually log certain trace statements. Trace message output should be low since string concatenations etc are expensive operations which should generally be avoided.- Returns:
- A boolean indicating that trace messaging is enabled.
-
isDebugEnabled
boolean isDebugEnabled()This function can be queried to choose whether to actually log certain debug statements. Debugging message output should be low since string concatenations etc are expensive operations which should generally be avoided.- Returns:
- A boolean indicating that debug messaging is enabled.
-
isInfoEnabled
boolean isInfoEnabled()This function can be queried to choose whether to actually log certain info statements.- Returns:
- A boolean indicating that info messaging is enabled.
-
isWarningEnabled
boolean isWarningEnabled()This function can be queried to choose whether to actually log certain warning statements.- Returns:
- A boolean indicating that warning messaging is enabled.
-
isErrorEnabled
boolean isErrorEnabled()This function can be queried to choose whether to actually log certain error statements.- Returns:
- A boolean indicating that error messaging is enabled.
-