Package org.jboss.logmanager.config
Class LoggerConfigurationImpl
java.lang.Object
org.jboss.logmanager.config.AbstractBasicConfiguration<Logger,LoggerConfigurationImpl>
org.jboss.logmanager.config.LoggerConfigurationImpl
- All Implemented Interfaces:
HandlerContainingConfigurable
,LoggerConfiguration
,NamedConfigurable
final class LoggerConfigurationImpl
extends AbstractBasicConfiguration<Logger,LoggerConfigurationImpl>
implements LoggerConfiguration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ValueExpression
<String> private ValueExpression
<String> private ValueExpression
<Boolean> Fields inherited from class org.jboss.logmanager.config.AbstractBasicConfiguration
configs, refs
-
Constructor Summary
ConstructorsConstructorDescriptionLoggerConfigurationImpl
(String name, LogContextConfigurationImpl configuration) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addHandlerName
(String name) Add a handler name to this logger.Get the name of the filter to use.Returns a filter that may be an expression.Get the names of the configured handlers.getLevel()
Gets the level set on the logger.Returns the level that may be an expression.(package private) ConfigAction
<Void> Determine whether parent handlers will be used.Returns a filter that may be an expression.boolean
removeHandlerName
(String name) Remove a handler name from this logger.void
Set the name of the filter to use, ornull
to leave unconfigured.void
Sets the expression value and for the filter.private void
setFilter
(ValueExpression<String> valueExpression) void
setHandlerNames
(String... names) Set the names of the configured handlers.void
setHandlerNames
(Collection<String> names) Set the names of the configured handlers.void
Sets the level on the logger.void
Sets the expression value for the level.private void
setLevelValueExpression
(ValueExpression<String> expression) void
setUseParentHandlers
(Boolean useParentHandlers) Set whether to use parent handlers.void
setUseParentHandlers
(String expression) Set whether to use parent handlers.void
setUseParentHandlers
(String expression, Boolean value) Set whether to use parent handlers.private void
setUseParentHandlers
(ValueExpression<Boolean> valueExpression) Methods inherited from class org.jboss.logmanager.config.AbstractBasicConfiguration
clearRemoved, getConfigs, getConfiguration, getName, getRefs, isRemoved, setRemoved
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.logmanager.config.NamedConfigurable
getName
-
Field Details
-
filter
-
useParentHandlers
-
level
-
handlerNames
-
-
Constructor Details
-
LoggerConfigurationImpl
LoggerConfigurationImpl(String name, LogContextConfigurationImpl configuration)
-
-
Method Details
-
getFilter
Description copied from interface:LoggerConfiguration
Get the name of the filter to use.- Specified by:
getFilter
in interfaceLoggerConfiguration
- Returns:
- the filter name
-
getFilterValueExpression
Description copied from interface:LoggerConfiguration
Returns a filter that may be an expression.- Specified by:
getFilterValueExpression
in interfaceLoggerConfiguration
- Returns:
- the filter
-
setFilter
Description copied from interface:LoggerConfiguration
Set the name of the filter to use, ornull
to leave unconfigured.- Specified by:
setFilter
in interfaceLoggerConfiguration
- Parameters:
filter
- the filter name
-
setFilter
Description copied from interface:LoggerConfiguration
Sets the expression value and for the filter. This method will not parse the expression for the value and instead use thevalue
parameter for the filter on the logger.- Specified by:
setFilter
in interfaceLoggerConfiguration
- Parameters:
expression
- the expressionvalue
- the value to set the filter to
-
setFilter
-
getUseParentHandlers
Description copied from interface:LoggerConfiguration
Determine whether parent handlers will be used.- Specified by:
getUseParentHandlers
in interfaceLoggerConfiguration
- Returns:
- the setting, or
null
to leave unconfigured
-
getUseParentHandlersValueExpression
Description copied from interface:LoggerConfiguration
Returns a filter that may be an expression.- Specified by:
getUseParentHandlersValueExpression
in interfaceLoggerConfiguration
- Returns:
- the setting, or
null
to leave unconfigured as a value expression
-
setUseParentHandlers
Description copied from interface:LoggerConfiguration
Set whether to use parent handlers. A value ofnull
indicates that the value should be left unconfigured.- Specified by:
setUseParentHandlers
in interfaceLoggerConfiguration
- Parameters:
useParentHandlers
- whether to use parent handlers
-
setUseParentHandlers
Description copied from interface:LoggerConfiguration
Set whether to use parent handlers.- Specified by:
setUseParentHandlers
in interfaceLoggerConfiguration
- Parameters:
expression
- the expression value used to resolve the setting- See Also:
-
setUseParentHandlers
Description copied from interface:LoggerConfiguration
Set whether to use parent handlers. This method will not parse the expression for the value and instead use thevalue
parameter for the setting on the logger.- Specified by:
setUseParentHandlers
in interfaceLoggerConfiguration
- Parameters:
expression
- the expressionvalue
- the value to set the setting to- See Also:
-
setUseParentHandlers
-
getLevel
Description copied from interface:LoggerConfiguration
Gets the level set on the logger.- Specified by:
getLevel
in interfaceLoggerConfiguration
- Returns:
- the level
-
getLevelValueExpression
Description copied from interface:LoggerConfiguration
Returns the level that may be an expression.- Specified by:
getLevelValueExpression
in interfaceLoggerConfiguration
- Returns:
- the level
-
setLevel
Description copied from interface:LoggerConfiguration
Sets the level on the logger.- Specified by:
setLevel
in interfaceLoggerConfiguration
- Parameters:
level
- the level to set, may be an expression- See Also:
-
setLevel
Description copied from interface:LoggerConfiguration
Sets the expression value for the level. This method will not parse the expression for the value and instead use thelevel
parameter for the level on the logger.- Specified by:
setLevel
in interfaceLoggerConfiguration
- Parameters:
expression
- the expression used to resolve the levellevel
- the level to use- See Also:
-
setLevelValueExpression
-
getHandlerNames
Description copied from interface:HandlerContainingConfigurable
Get the names of the configured handlers.- Specified by:
getHandlerNames
in interfaceHandlerContainingConfigurable
- Returns:
- the names of the configured handlers
-
setHandlerNames
Description copied from interface:HandlerContainingConfigurable
Set the names of the configured handlers.- Specified by:
setHandlerNames
in interfaceHandlerContainingConfigurable
- Parameters:
names
- the names of the configured handlers
-
setHandlerNames
Description copied from interface:HandlerContainingConfigurable
Set the names of the configured handlers.- Specified by:
setHandlerNames
in interfaceHandlerContainingConfigurable
- Parameters:
names
- the names of the configured handlers
-
addHandlerName
Description copied from interface:HandlerContainingConfigurable
Add a handler name to this logger.- Specified by:
addHandlerName
in interfaceHandlerContainingConfigurable
- Parameters:
name
- the handler name- Returns:
true
if the name was not already set,false
if it was
-
removeHandlerName
Description copied from interface:HandlerContainingConfigurable
Remove a handler name from this logger.- Specified by:
removeHandlerName
in interfaceHandlerContainingConfigurable
- Parameters:
name
- the handler name- Returns:
true
if the name was removed,false
if it was not present
-
getRemoveAction
ConfigAction<Void> getRemoveAction()- Overrides:
getRemoveAction
in classAbstractBasicConfiguration<Logger,
LoggerConfigurationImpl>
-