Package org.apache.rat.utils
Interface Log
- All Known Implementing Classes:
DefaultLog
public interface Log
The definition of logging for the core. UIs are expected to provide an implementation of
Log to log data to the appropriate system within the UI.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault WriterasWriter()Returns a Writer backed by this log.default WriterReturns a Writer backed by this log.default voidWrite a message at DEBUG level.default voidWrite a debug message and report throwable stack trace.default voidWrite a message at ERROR level.default voidWrite an error message and report throwable stack trace.static StringformatLogEntry(String message, Throwable throwable)getLevel()Gets the log level that is enabled.default voidWrite a message at INFO level.default voidWrite an info message and report throwable stack trace.default booleanDetermines if the log level is enabled.default voidWrites a log message at the specified level.default voidWrite a log message and report throwable stack trace at the specified log level.voidWrites a message at a specific log level.default voidWrite a log message and report throwable stack trace at the specified log level.default voidSets the log level.default voidWrite a message at WARN level.default voidWrite a warn message and report throwable stack trace.
-
Method Details
-
formatLogEntry
-
getLevel
Log.Level getLevel()Gets the log level that is enabled. If encapsulated logger does not report level implementations should return DEBUG.- Returns:
- the level that is enabled.
-
setLevel
Sets the log level. Implementations may elect not to set the level dynamically. However, if the option is supported this method should be overridden.- Parameters:
level- the level to set.
-
isEnabled
Determines if the log level is enabled.- Parameters:
level- The level to check.- Returns:
- true if the level will produce output in the log.
-
log
Writes a message at a specific log level.- Parameters:
level- The log level to write at.message- the message to write.
-
log
Writes a log message at the specified level.- Parameters:
level- the level to write the message at.message- the message to write.
-
debug
Write a message at DEBUG level.- Parameters:
message- the message to write.
-
info
Write a message at INFO level.- Parameters:
message- the message to write.
-
warn
Write a message at WARN level.- Parameters:
message- the message to write.
-
error
Write a message at ERROR level.- Parameters:
message- the message to write.
-
log
Write a log message and report throwable stack trace at the specified log level.- Parameters:
level- the level to report atmessage- the message for the logthrowable- the throwable
-
log
Write a log message and report throwable stack trace at the specified log level.- Parameters:
level- the level to report atmessage- the message for the logthrowable- the throwable
-
debug
Write a debug message and report throwable stack trace.- Parameters:
message- the message for the logthrowable- the throwable
-
info
Write an info message and report throwable stack trace.- Parameters:
message- the message for the logthrowable- the throwable
-
warn
Write a warn message and report throwable stack trace.- Parameters:
message- the message for the logthrowable- the throwable
-
error
Write an error message and report throwable stack trace.- Parameters:
message- the message for the logthrowable- the throwable
-
asWriter
Returns a Writer backed by this log. All messages are logged at "INFO" level.- Returns:
- the Writer backed by this log.
-
asWriter
Returns a Writer backed by this log. All messages are logged at "INFO" level.- Parameters:
level- the Log level to write at.- Returns:
- the Writer backed by this log.
-