Class DefaultLogger
- All Implemented Interfaces:
ResolverLogger
System.err.
By default, the DEFAULT_LOGGER_LOG_LEVEL feature determines
which messages are logged. The valid levels are "debug", "info", "warn", and "none". An invalid level
is treated as "warn".
If the level is set to "debug", all messages will be printed. If set to "info", info and warning messages will be printed. If set to "warn", only warning messages will be printed. If set to "none", no messages are printed.
If the configuration's DEFAULT_LOGGER_LOG_LEVEL is changed, that change will be
detected by the logger and it will use that level going forward. The value can also be changed
directly by calling setLogLevel(String). That level will remain in effect as long as the configuration
default does not change.
-
Field Summary
Fields inherited from class AbstractLogger
CACHE, catalogLogging, categories, CONFIG, DEBUG, ERROR, INFO, NONE, REQUEST, RESPONSE, TRACE, WARN, WARNING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWrites a debug message toSystem.err.Get the current logging level.voidWrites an informational message toSystem.err.voidsetLogLevel(String level) Set the current logging level.voidWrites a warning message toSystem.err.Methods inherited from class AbstractLogger
getCategory, log, logMessage, setCategory
-
Constructor Details
-
DefaultLogger
Initialize the logger.The
DEFAULT_LOGGER_LOG_LEVELis obtained from the configuration.- Parameters:
config- The resolver configuration.
-
-
Method Details
-
getLogLevel
-
setLogLevel
Set the current logging level.- Parameters:
level- The logging level.
-
info
Writes an informational message toSystem.err.- Parameters:
message- The message.
-
debug
Writes a debug message toSystem.err.- Parameters:
message- The message.
-
warn
Writes a warning message toSystem.err.- Parameters:
message- The message.
-