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.LogManagerjava.io.IOExceptionjava.lang.SecurityExceptionpublic void readConfiguration(java.io.InputStream inputStream)
throws java.io.IOException,
java.lang.SecurityException
readConfiguration in class java.util.logging.LogManagerinputStream - the input stream from which the logmanager should be configuredjava.io.IOExceptionjava.lang.SecurityExceptionstatic <T> T construct(java.lang.Class<? extends T> type,
java.lang.String className)
throws java.io.IOException
java.io.IOExceptionpublic void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in class java.util.logging.LogManagerl - ignoredpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in class java.util.logging.LogManagerl - ignoredpublic java.lang.String getProperty(java.lang.String name)
getProperty in class java.util.logging.LogManagername - ignorednullpublic void reset()
reset in class java.util.logging.LogManagerpublic java.util.Enumeration<java.lang.String> getLoggerNames()
getLoggerNames in class java.util.logging.LogManagerpublic boolean addLogger(java.util.logging.Logger logger)
getLogger(String).addLogger in class java.util.logging.LogManagerlogger - ignoredfalsepublic Logger getLogger(java.lang.String name)
getLogger in class java.util.logging.LogManagername - 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