Module org.jboss.logmanager
Class PropertyLogContextConfigurator
java.lang.Object
org.jboss.logmanager.configuration.PropertyLogContextConfigurator
- All Implemented Interfaces:
LogContextConfigurator
A default log context configuration.
If the input stream is null an attempt is made to find a
logging.properties file. If the file is not found, a service loader is
used to find the first implementation of a LogContextConfigurator. If that fails a default
ConsoleHandler is configured with the pattern %d{yyyy-MM-dd'T'HH:mm:ssXXX} %-5p [%c] (%t) %s%e%n.
Locating the logging.properties happens in the following order:
- The
logging.configurationsystem property is checked - The current threads ClassLoader.getResourceAsStream(String) class loader} for a
logging.properties - Finally
Class.getResourceAsStream(String)is used to locate alogging.properties
- Author:
- James R. Perkins
-
Field Summary
Fields inherited from interface org.jboss.logmanager.LogContextConfigurator
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(LogContext logContext, InputStream inputStream) Configure the given log context according to this configurator's policy.
-
Constructor Details
-
PropertyLogContextConfigurator
public PropertyLogContextConfigurator()
-
-
Method Details
-
configure
Description copied from interface:LogContextConfiguratorConfigure the given log context according to this configurator's policy. If a configuration stream was provided, that is passed in to this method to be used or ignored. The stream should remain open after this method is called.- Specified by:
configurein interfaceLogContextConfigurator- Parameters:
logContext- the log context to configure (notnull)inputStream- the input stream that was requested to be used, ornullif none was provided
-