Module org.glassfish.main.jul
Package org.glassfish.main.jul.handler
Class HandlerConfigurationHelper
java.lang.Object
org.glassfish.main.jul.cfg.ConfigurationHelper
org.glassfish.main.jul.handler.HandlerConfigurationHelper
This is a tool to help with parsing the logging.properties file to configure handlers.
It respects JUL configuration standards, so ie. each formatter knows best how to configure itself, but still can use this helper to parse properties directly to objects instead of plain strings. Helper also supports custom error handlers.
- Author:
- David Matejcek
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.main.jul.cfg.ConfigurationHelper
ConfigurationHelper.LoggingPropertyErrorHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LogPropertyHandler's property for filterstatic final LogPropertyHandler's property for formatterFields inherited from class org.glassfish.main.jul.cfg.ConfigurationHelper
ERROR_HANDLER_PRINT_TO_STDERR -
Constructor Summary
ConstructorsConstructorDescriptionHandlerConfigurationHelper(HandlerId handlerId) Creates a helper based onHandlerId -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerConfigurationHelperforHandlerClass(Class<? extends Handler> handlerClass) Creates a helper based onHandlerId.getFormatter(Class<? extends Formatter> defaultFormatterClass) Methods inherited from class org.glassfish.main.jul.cfg.ConfigurationHelper
getBoolean, getCharacter, getCharset, getDateTimeFormatter, getFile, getInteger, getLevel, getList, getNonNegativeInteger, getString, handleError, parse, parseOrSupply
-
Field Details
-
FORMATTER
Handler's property for formatter -
FILTER
Handler's property for filter
-
-
Constructor Details
-
HandlerConfigurationHelper
Creates a helper based onHandlerId- Parameters:
handlerId-
-
-
Method Details
-
forHandlerClass
Creates a helper based onHandlerId. For the id uses the handlerClass parameter.- Parameters:
handlerClass-- Returns:
HandlerConfigurationHelper
-
getFormatter
- Parameters:
defaultFormatterClass-- Returns:
- preconfigured
Formatter, defaults are defined by the formatter and properties
-
getFilter
- Returns:
- preconfigured
Filter, default is null.
-