Class PropertyLogContextConfigurator
- java.lang.Object
-
- org.jboss.logmanager.configuration.PropertyLogContextConfigurator
-
- All Implemented Interfaces:
LogContextConfigurator
public class PropertyLogContextConfigurator extends Object implements LogContextConfigurator
A default log context configuration.If the input stream is
null
an attempt is made to find alogging.properties
file. If the file is not found, a service loader is used to find the first implementation of aLogContextConfigurator
. If that fails a defaultConsoleHandler
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.configuration
system 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 Constructor Description PropertyLogContextConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(LogContext logContext, InputStream inputStream)
Configure the given log context according to this configurator's policy.
-
-
-
Method Detail
-
configure
public void configure(LogContext logContext, InputStream inputStream)
Description copied from interface:LogContextConfigurator
Configure 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:
configure
in interfaceLogContextConfigurator
- Parameters:
logContext
- the log context to configure (notnull
)inputStream
- the input stream that was requested to be used, ornull
if none was provided
-
-