Class AbstractLogger
java.lang.Object
org.xmlresolver.logging.AbstractLogger
- All Implemented Interfaces:
ResolverLogger
- Direct Known Subclasses:
DefaultLogger, SystemLogger
The abstract logger implements some of the core functionality needed regardless of
how the messages are processed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMessages related to how the cache is used.protected Stringstatic final StringMessages related to resolver configuration.protected static final intstatic final StringError messages.protected static final intprotected static final intstatic final StringRequests for resource resolution.static final StringResponses describing how a request was resolved.static final StringTrace (or debuggin) messages.protected static final intstatic final StringWarning messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCategory(String cat) Returns the log level, "debug", "info", worn", or "none" associated with a category.voidLog a message.protected StringlogMessage(String cat, String message, Object... params) voidsetCategory(String cat, String level) Set the log level for a category.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResolverLogger
debug, info, warn
-
Field Details
-
REQUEST
-
RESPONSE
-
TRACE
-
ERROR
-
CACHE
-
CONFIG
-
WARNING
-
DEBUG
protected static final int DEBUG- See Also:
-
INFO
protected static final int INFO- See Also:
-
WARN
protected static final int WARN- See Also:
-
NONE
protected static final int NONE- See Also:
-
categories
-
catalogLogging
-
-
Constructor Details
-
AbstractLogger
public AbstractLogger()Initializes properties of the abstract class.
-
-
Method Details
-
getCategory
Returns the log level, "debug", "info", worn", or "none" associated with a category.- Specified by:
getCategoryin interfaceResolverLogger- Parameters:
cat- The category.- Returns:
- The level. If no level has been configured for that category, the default is "debug".
-
setCategory
Set the log level for a category. After this call, messages in the specified category will be logged at the specified level. Valid levels are "debug", "info", and "warn". An invalid level is treated as "debug".- Specified by:
setCategoryin interfaceResolverLogger- Parameters:
cat- The category.level- The level.
-
logMessage
-
log
Log a message.The category is used to determine what level of logging is expected for this message. The message is then formatted with its parameters and logged.
The message and its parameters are formatted with
Formatter.- Specified by:
login interfaceResolverLogger- Parameters:
cat- The category.message- The message.params- The message parameters.
-