public final class LogManager
extends java.util.logging.LogManager
Modifier and Type | Class and Description |
---|---|
private static class |
LogManager.KnownLevelBuilder |
private static class |
LogManager.LocalFilterHolder |
private static class |
LogManager.ReadOnlyArrayList<T> |
private static class |
LogManager.ReadOnlyHashMap<K,V> |
private static class |
LogManager.ReadOnlyMapEntry<K,V> |
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicBoolean |
configured |
(package private) static boolean |
PER_THREAD_LOG_FILTER |
static java.lang.String |
PER_THREAD_LOG_FILTER_KEY |
Constructor and Description |
---|
LogManager()
Construct a new logmanager instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addLogger(java.util.logging.Logger logger)
Do nothing.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Do nothing.
|
(package private) static <T> T |
construct(java.lang.Class<? extends T> type,
java.lang.String className) |
Logger |
getLogger(java.lang.String name)
Get or create a logger with the given name.
|
java.util.Enumeration<java.lang.String> |
getLoggerNames() |
java.lang.String |
getProperty(java.lang.String name)
Does nothing.
|
static java.util.logging.Filter |
getThreadLocalLogFilter()
Returns the currently set filter for this thread or
null if one has not been set. |
void |
readConfiguration()
Configure the log manager one time.
|
void |
readConfiguration(java.io.InputStream inputStream)
Configure the log manager.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Do nothing.
|
void |
reset()
Does nothing.
|
static void |
setThreadLocalLogLevel(java.util.logging.Filter filter)
Sets the filter on the thread for all loggers.
|
private static java.lang.String |
tryGetProperty(java.lang.String name,
java.lang.String defaultVal) |
public static final java.lang.String PER_THREAD_LOG_FILTER_KEY
static final boolean PER_THREAD_LOG_FILTER
private final java.util.concurrent.atomic.AtomicBoolean configured
public LogManager()
Level
as
well.private static java.lang.String tryGetProperty(java.lang.String name, java.lang.String defaultVal)
public void readConfiguration() throws java.io.IOException, java.lang.SecurityException
ConfigurationLocator
is created by constructing an
instance of the class name specified in the org.jboss.logmanager.configurationLocator
system property.readConfiguration
in class java.util.logging.LogManager
java.io.IOException
java.lang.SecurityException
public void readConfiguration(java.io.InputStream inputStream) throws java.io.IOException, java.lang.SecurityException
readConfiguration
in class java.util.logging.LogManager
inputStream
- the input stream from which the logmanager should be configuredjava.io.IOException
java.lang.SecurityException
static <T> T construct(java.lang.Class<? extends T> type, java.lang.String className) throws java.io.IOException
java.io.IOException
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener
in class java.util.logging.LogManager
l
- ignoredpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener
in class java.util.logging.LogManager
l
- ignoredpublic java.lang.String getProperty(java.lang.String name)
getProperty
in class java.util.logging.LogManager
name
- ignorednull
public void reset()
reset
in class java.util.logging.LogManager
public java.util.Enumeration<java.lang.String> getLoggerNames()
getLoggerNames
in class java.util.logging.LogManager
public boolean addLogger(java.util.logging.Logger logger)
getLogger(String)
.addLogger
in class java.util.logging.LogManager
logger
- ignoredfalse
public Logger getLogger(java.lang.String name)
getLogger
in class java.util.logging.LogManager
name
- the logger namepublic static java.util.logging.Filter getThreadLocalLogFilter()
null
if one has not been set.
If the PER_THREAD_LOG_FILTER_KEY
is not set to true
then null
will always be returned.
null
if no level was setpublic static void setThreadLocalLogLevel(java.util.logging.Filter filter)
This feature only works if the PER_THREAD_LOG_FILTER
was set to true
filter
- the filter to set for all loggers on this thread