Interface LogContextConfiguration
- All Known Implementing Classes:
LogContextConfigurationImpl
public interface LogContextConfiguration
A log context configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe factory class for persistent configurations. -
Method Summary
Modifier and TypeMethodDescriptionaddErrorManagerConfiguration(String moduleName, String className, String errorManagerName, String... constructorProperties) addFilterConfiguration(String moduleName, String className, String filterName, String... constructorProperties) addFormatterConfiguration(String moduleName, String className, String formatterName, String... constructorProperties) addHandlerConfiguration(String moduleName, String className, String handlerName, String... constructorProperties) Add a handler configuration.addLoggerConfiguration(String loggerName) addPojoConfiguration(String moduleName, String className, String pojoName, String... constructorProperties) Add a POJO configuration.voidcommit()Commit the current changes into the running logging configuration.voidforget()Clear all the current changes and restore this object to its original state.getErrorManagerConfiguration(String errorManagerName) getFilterConfiguration(String filterName) getFormatterConfiguration(String formatterName) getHandlerConfiguration(String handlerName) Get the log context being configured by this configuration object.getLoggerConfiguration(String loggerName) getPojoConfiguration(String pojoName) Gets the POJO configuration.A list of the POJO configuration names.voidprepare()Prepares the current changes.booleanremoveErrorManagerConfiguration(String errorManagerName) booleanremoveFilterConfiguration(String filterName) booleanremoveFormatterConfiguration(String formatterName) booleanremoveHandlerConfiguration(String handlerName) Remove a handler configuration.booleanremoveLoggerConfiguration(String loggerName) booleanremovePojoConfiguration(String pojoName) Removes the POJO configuration.
-
Method Details
-
getLogContext
LogContext getLogContext()Get the log context being configured by this configuration object.- Returns:
- the log context
-
addLoggerConfiguration
-
removeLoggerConfiguration
-
getLoggerConfiguration
-
getLoggerNames
-
addHandlerConfiguration
HandlerConfiguration addHandlerConfiguration(String moduleName, String className, String handlerName, String... constructorProperties) Add a handler configuration.- Parameters:
moduleName- the module name, ornullto use the logmanager's class pathclassName- the class name of the handler (must not benull)handlerName- the name of the handler (must be unique within this configuration and notnull)constructorProperties- an optional list of constructor property names- Returns:
- the new handler configuration
-
removeHandlerConfiguration
Remove a handler configuration. Also removes handler from everything it was added to.- Parameters:
handlerName- the handler name to remove- Returns:
trueif the handler was removed,falseif the handler didn't exist
-
getHandlerConfiguration
-
getHandlerNames
-
addFormatterConfiguration
FormatterConfiguration addFormatterConfiguration(String moduleName, String className, String formatterName, String... constructorProperties) -
removeFormatterConfiguration
-
getFormatterConfiguration
-
getFormatterNames
-
addFilterConfiguration
FilterConfiguration addFilterConfiguration(String moduleName, String className, String filterName, String... constructorProperties) -
removeFilterConfiguration
-
getFilterConfiguration
-
getFilterNames
-
addErrorManagerConfiguration
ErrorManagerConfiguration addErrorManagerConfiguration(String moduleName, String className, String errorManagerName, String... constructorProperties) -
removeErrorManagerConfiguration
-
getErrorManagerConfiguration
-
getErrorManagerNames
-
prepare
-
addPojoConfiguration
PojoConfiguration addPojoConfiguration(String moduleName, String className, String pojoName, String... constructorProperties) Add a POJO configuration.- Parameters:
moduleName- the module name, ornullto use the logmanager's class pathclassName- the class name of the POJO (must not benull)pojoName- the name of the POJO (must be unique within this configuration and notnullconstructorProperties- an optional list of constructor property names- Returns:
- the new handler configuration
-
removePojoConfiguration
Removes the POJO configuration.- Parameters:
pojoName- the name of the POJO- Returns:
trueif the configuration was removed, othwerwisefalseif the configuration did not exist or was not remove.
-
getPojoConfiguration
Gets the POJO configuration.- Parameters:
pojoName- the name of the POJO- Returns:
- the POJO configuration if found, otherwise
null
-
getPojoNames
-
commit
void commit()Commit the current changes into the running logging configuration. -
forget
void forget()Clear all the current changes and restore this object to its original state.
-