Package dev.alphagame.trailblazer
Class TBLogger
java.lang.Object
dev.alphagame.trailblazer.TBLogger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a message with the DEBUG level.void
Logs a message with the DEBUG level.void
Logs an exception with the DEBUG level.void
Logs a message with the ERROR level.void
Logs a message with the ERROR level.void
Logs an exception with the ERROR level.void
Logs a message with the FATAL level.void
Logs a message with the FATAL level.void
Logs an exception with the FATAL level.Gets the configuration of this logger.Gets the name of this logger.Gets the current log level of this logger.void
Logs a message with the INFO level.void
Logs a message with the INFO level.void
Logs an exception with the INFO level.boolean
Checks if DEBUG level is enabled for this logger.boolean
Checks if ERROR level is enabled for this logger.boolean
Checks if FATAL level is enabled for this logger.boolean
Checks if INFO level is enabled for this logger.boolean
Checks if WARN level is enabled for this logger.void
setConfiguration
(LoggerConfiguration configuration) Sets the configuration for this logger.void
setLogLevel
(LogLevel logLevel) Sets the log level for this logger.void
Logs a message with the WARN level.void
Logs a message with the WARN level.void
Logs an exception with the WARN level.
-
Constructor Details
-
TBLogger
-
TBLogger
-
-
Method Details
-
info
Logs a message with the INFO level.- Parameters:
message
- The message to log.args
- The arguments to format the message with.
-
info
Logs a message with the INFO level.- Parameters:
message
- The message to log.
-
debug
Logs a message with the DEBUG level.- Parameters:
message
- The message to log.args
- The arguments to format the message with.
-
debug
Logs a message with the DEBUG level.- Parameters:
message
- The message to log.
-
warn
Logs a message with the WARN level.- Parameters:
message
- The message to log.args
- The arguments to format the message with.
-
warn
Logs a message with the WARN level.- Parameters:
message
- The message to log.
-
error
Logs a message with the ERROR level.- Parameters:
message
- The message to log.args
- The arguments to format the message with.
-
error
Logs a message with the ERROR level.- Parameters:
message
- The message to log.
-
fatal
Logs a message with the FATAL level.- Parameters:
message
- The message to log.args
- The arguments to format the message with.
-
fatal
Logs a message with the FATAL level.- Parameters:
message
- The message to log.
-
error
Logs an exception with the ERROR level.- Parameters:
message
- The message to log.throwable
- The exception to log.
-
warn
Logs an exception with the WARN level.- Parameters:
message
- The message to log.throwable
- The exception to log.
-
info
Logs an exception with the INFO level.- Parameters:
message
- The message to log.throwable
- The exception to log.
-
debug
Logs an exception with the DEBUG level.- Parameters:
message
- The message to log.throwable
- The exception to log.
-
fatal
Logs an exception with the FATAL level.- Parameters:
message
- The message to log.throwable
- The exception to log.
-
isDebugEnabled
public boolean isDebugEnabled()Checks if DEBUG level is enabled for this logger.- Returns:
- true if DEBUG level is enabled.
-
isInfoEnabled
public boolean isInfoEnabled()Checks if INFO level is enabled for this logger.- Returns:
- true if INFO level is enabled.
-
isWarnEnabled
public boolean isWarnEnabled()Checks if WARN level is enabled for this logger.- Returns:
- true if WARN level is enabled.
-
isErrorEnabled
public boolean isErrorEnabled()Checks if ERROR level is enabled for this logger.- Returns:
- true if ERROR level is enabled.
-
isFatalEnabled
public boolean isFatalEnabled()Checks if FATAL level is enabled for this logger.- Returns:
- true if FATAL level is enabled.
-
setLogLevel
Sets the log level for this logger.- Parameters:
logLevel
- The new log level.
-
getLogLevel
Gets the current log level of this logger.- Returns:
- The current log level.
-
getLoggerName
Gets the name of this logger.- Returns:
- The logger name.
-
getConfiguration
Gets the configuration of this logger.- Returns:
- The logger configuration.
-
setConfiguration
Sets the configuration for this logger.- Parameters:
configuration
- The new configuration.
-