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 Writer
asWriter()
Returns a Writer backed by this log.default Writer
Returns a Writer backed by this log.default void
Write a message at DEBUG level.default void
Write a debug message and report throwable stack trace.default void
Write a message at ERROR level.default void
Write an error message and report throwable stack trace.getLevel()
Gets the log level that is enabled.default void
Write a message at INFO level.default void
Write an info message and report throwable stack trace.default boolean
Determines if the log level is enabled.default void
Writes a log message at the specified level.default void
Write a log message and report throwable stack trace at the specified log level.void
Writes a message at a specific log level.default void
Write a log message and report throwable stack trace at the specified log level.default void
Sets the log level.default void
Write a message at WARN level.default void
Write a warn message and report throwable stack trace.
-
Method Details
-
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.
-