|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.logging.LogManager
org.x4juli.ClassLoaderLogManager
Per classloader LogManager implementation. Based on Version 1.11 Apache Tomcat JULI
| Nested Class Summary | |
protected static class |
ClassLoaderLogManager.ClassLoaderLogInfo
Repository for loggers, nodes, handlers, properties for each classloader. |
protected static class |
ClassLoaderLogManager.LogNode
A LogNode represents one step in a namespace of Loggers. |
private static class |
ClassLoaderLogManager.RootLogger
This class is needed to instantiate the root of each per classloader hierarchy. |
| Nested classes inherited from class java.util.logging.LogManager |
|
| Field Summary | |
protected java.util.Map |
classLoaderLoggers
Map containing the classloader information, keyed per classloader. |
protected ObjectStore |
loggerRepository
The ObjectStore is added to have an single, global ObjectStoreImpl. |
protected java.lang.ThreadLocal |
prefix
This prefix is used to allow using prefixes for the properties names of handlers and their subcomponents. |
| Fields inherited from class java.util.logging.LogManager |
|
| Constructor Summary | |
ClassLoaderLogManager()
Default Constructor. |
|
| Method Summary | |
boolean |
addLogger(java.util.logging.Logger logger)
Add the specified logger to the classloader local configuration. |
protected java.util.logging.Logger |
createRootLogger()
Creates a new RootLogger. |
protected static void |
doSetParentLogger(java.util.logging.Logger logger,
java.util.logging.Logger parent)
Set parent child relationship between the two specified loggers. |
protected ClassLoaderLogManager.ClassLoaderLogInfo |
getClassLoaderInfo(java.lang.ClassLoader classloader)
Retrieve the configuration associated with the specified classloader. |
java.lang.String |
getFQCNofLogger()
Returns the full qualified class name of the logger. Must correspond to getLoggerClass, but should not be created dynamicly. |
java.util.logging.Logger |
getLogger(java.lang.String name)
Get the logger associated with the specified name inside the classloader local configuration. |
java.lang.Class |
getLoggerClass()
Returns the class of the actual used logger for system. |
java.util.Enumeration |
getLoggerNames()
Get an enumeration of the logger names currently defined in the classloader local configuration. |
ObjectStore |
getLoggerRepository()
Get the actual repository for objects in the system. |
java.lang.String |
getProperty(java.lang.String name)
Get the value of the specified property in the classloader local configuration. |
void |
readConfiguration()
|
protected void |
readConfiguration(java.lang.ClassLoader classLoader)
Read configuration for the specified classloader. |
void |
readConfiguration(java.io.InputStream is)
|
protected void |
readConfiguration(java.io.InputStream is,
java.lang.ClassLoader classLoader)
Load specified configuration. |
protected java.lang.String |
replace(java.lang.String str)
System property replacement in the given string. |
| Methods inherited from class java.util.logging.LogManager |
addPropertyChangeListener, checkAccess, getLogManager, removePropertyChangeListener, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final java.util.Map classLoaderLoggers
protected java.lang.ThreadLocal prefix
protected ObjectStore loggerRepository
| Constructor Detail |
public ClassLoaderLogManager()
| Method Detail |
public boolean addLogger(java.util.logging.Logger logger)
logger - The logger to be added.
public java.util.logging.Logger getLogger(java.lang.String name)
name - The name of the logger to retrieve.
public java.util.Enumeration getLoggerNames()
public java.lang.String getProperty(java.lang.String name)
name - The property name
public void readConfiguration()
throws java.io.IOException,
java.lang.SecurityException
java.io.IOException
java.lang.SecurityException
public void readConfiguration(java.io.InputStream is)
throws java.io.IOException,
java.lang.SecurityException
java.io.IOException
java.lang.SecurityExceptionpublic ObjectStore getLoggerRepository()
getLoggerRepository in interface LoggerRepositoryHolderpublic java.lang.String getFQCNofLogger()
getFQCNofLogger in interface LoggerClassInformationpublic java.lang.Class getLoggerClass()
getLoggerClass in interface LoggerClassInformationprotected ClassLoaderLogManager.ClassLoaderLogInfo getClassLoaderInfo(java.lang.ClassLoader classloader)
classloader - The classloader for which we will retrieve or build
the configuration
protected void readConfiguration(java.lang.ClassLoader classLoader)
throws java.io.IOException
classLoader - to load the properties from.
java.io.IOException - if reading the contained or derived
logging.properties file fails.
protected void readConfiguration(java.io.InputStream is,
java.lang.ClassLoader classLoader)
throws java.io.IOException
is - InputStream to the properties fileclassLoader - for which the configuration will be loaded
java.io.IOException - If something wrong happens during load.
protected static void doSetParentLogger(java.util.logging.Logger logger,
java.util.logging.Logger parent)
logger - the child logger.parent - the new parent logger.protected java.lang.String replace(java.lang.String str)
str - The original string
protected java.util.logging.Logger createRootLogger()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||