Top Description Fields Constructors Methods
org.jboss.logmanager.configuration

public Class PropertyContextConfiguration

extends ContextConfiguration
Class Inheritance
Annotations
@SuppressWarnings:WeakerAccess
Imports
java.util.ArrayList, .EnumSet, .List, .Locale, .Objects, .Properties, java.util.function.Supplier, java.util.logging.ErrorManager, .Filter, .Formatter, .Handler, .Level, org.jboss.logmanager.LogContext, .Logger, .StandardOutputStreams, org.jboss.logmanager.configuration.filters.FilterExpressions, org.jboss.logmanager.filters.AcceptAllFilter, .DenyAllFilter, io.smallrye.common.expression.Expression

A utility to parse a logging.properties file and configure a LogContext.
Author
James R. Perkins

Field Summary

Modifier and TypeField and Description
private static final String[]
private final Properties
Inherited from org.jboss.logmanager.configuration.ContextConfiguration:
CONTEXT_CONFIGURATION_KEY

Constructor Summary

AccessConstructor and Description
private
PropertyContextConfiguration(final LogContext logContext, final Properties properties)

Method Summary

Modifier and TypeMethod and Description
public static PropertyContextConfiguration

Returns:

the context configuration for the properties
configure
(final LogContext
the log context to configure
logContext
,
final Properties
the properties used to configure the log context
properties
)

Configures the LogContext based on the properties.

private boolean
configureErrorManager(final String errorManagerName)

private boolean
configureFilter(final String filterName)

private boolean
configureFormatter(final String formatterName)

private boolean
configureHandler(final String handlerName)

private void
configureLogger(final String loggerName)

private void
configurePojos(final String pojoName)

private void
configureProperties(final ObjectBuilder<?> builder, final String prefix, final String name)

private void
private static String
getKey(final String prefix, final String objectName)

private static String
getKey(final String prefix, final String objectName, final String key)

private String[]
private String
private String
getStringProperty(final String key, final boolean trim, final boolean resolveExpression)

private static boolean
resolveBooleanExpression(final String possibleExpression)

private static String
resolveExpression(final String possibleExpression)

Inherited from org.jboss.logmanager.configuration.ContextConfiguration:
addErrorManageraddFilteraddFormatteraddHandleraddObjectclosegetContextgetErrorManagergetErrorManagersgetFiltergetFiltersgetFormattergetFormattersgetHandlergetHandlersgetLoggergetLoggersgetObjectgetObjectshasErrorManagerhasFilterhasFormatterhasHandlerhasLoggerhasObjectremoveErrorManagerremoveFilterremoveFormatterremoveHandlerremoveObject

Field Detail

EMPTY_STRINGSback to summary
private static final String[] EMPTY_STRINGS
propertiesback to summary
private final Properties properties

Constructor Detail

PropertyContextConfigurationback to summary
private PropertyContextConfiguration(final LogContext logContext, final Properties properties)

Method Detail

configureback to summary
public static PropertyContextConfiguration configure(final LogContext logContext, final Properties properties)

Configures the LogContext based on the properties.

Parameters
logContext:LogContext

the log context to configure

properties:Properties

the properties used to configure the log context

Returns:PropertyContextConfiguration

the context configuration for the properties

configureErrorManagerback to summary
private boolean configureErrorManager(final String errorManagerName)
configureFilterback to summary
private boolean configureFilter(final String filterName)
configureFormatterback to summary
private boolean configureFormatter(final String formatterName)
configureHandlerback to summary
private boolean configureHandler(final String handlerName)
configureLoggerback to summary
private void configureLogger(final String loggerName)
Annotations
@SuppressWarnings:ConstantConditions
configurePojosback to summary
private void configurePojos(final String pojoName)
configurePropertiesback to summary
private void configureProperties(final ObjectBuilder<?> builder, final String prefix, final String name)
doConfigureback to summary
private void doConfigure()
getKeyback to summary
private static String getKey(final String prefix, final String objectName)
getKeyback to summary
private static String getKey(final String prefix, final String objectName, final String key)
getStringCsvArrayback to summary
private String[] getStringCsvArray(final String key)
getStringPropertyback to summary
private String getStringProperty(final String key)
getStringPropertyback to summary
private String getStringProperty(final String key, final boolean trim, final boolean resolveExpression)
resolveBooleanExpressionback to summary
private static boolean resolveBooleanExpression(final String possibleExpression)
resolveExpressionback to summary
private static String resolveExpression(final String possibleExpression)