ClassLoaderLogManager (Tomcat API Documentation)
Keywords: org.apache.juli.ClassLoaderLogManager class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.juli
Class ClassLoaderLogManager

    java.lang.Object
      java.util.logging.LogManager
          org.apache.juli.ClassLoaderLogManager

    public class ClassLoaderLogManager

extends java.util.logging.LogManager

Per classloader LogManager implementation.

Nested Class Summary
`protected static class` | `ClassLoaderLogManager.ClassLoaderLogInfo`
`protected static class` | `ClassLoaderLogManager.LogNode`
`protected class` | `ClassLoaderLogManager.RootLogger` This class is needed to instantiate the root of each per classloader hierarchy.

Field Summary
`protected java.util.Map<java.lang.ClassLoader,ClassLoaderLogManager.ClassLoaderLogInfo>` | `classLoaderLoggers` Map containing the classloader information, keyed per classloader.
`protected java.lang.ThreadLocal<java.lang.String>` | `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
`LOGGING_MXBEAN_NAME`

Constructor Summary
`ClassLoaderLogManager()`

Method Summary
`boolean` | `addLogger(java.util.logging.Logger logger)` Add the specified logger to the classloader local configuration.
`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.util.logging.Logger` | `getLogger(java.lang.String name)` Get the logger associated with the specified name inside the classloader local configuration.
`java.util.Enumeration<java.lang.String>` | `getLoggerNames()` Get an enumeration of the logger names currently defined in the classloader local configuration.
`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, getLoggingMXBean, getLogManager, removePropertyChangeListener, reset`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### classLoaderLoggers

    protected final java.util.Map<java.lang.ClassLoader,ClassLoaderLogManager.ClassLoaderLogInfo> classLoaderLoggers

  Map containing the classloader information, keyed per classloader. A weak hashmap is used to ensure no classloader reference is leaked from application redeployment.

### prefix

    protected java.lang.ThreadLocal<java.lang.String> prefix

  This prefix is used to allow using prefixes for the properties names of handlers and their subcomponents.

Constructor Detail

### ClassLoaderLogManager

    public ClassLoaderLogManager()

Method Detail

### addLogger

    public boolean addLogger(java.util.logging.Logger logger)

  Add the specified logger to the classloader local configuration.

  Overrides:
    `addLogger` in class `java.util.logging.LogManager`
  Parameters:
    `logger` - The logger to be added

### getLogger

    public java.util.logging.Logger getLogger(java.lang.String name)

  Get the logger associated with the specified name inside the classloader local configuration. If this returns null, and the call originated for Logger.getLogger, a new logger with the specified name will be instantiated and added using addLogger.

  Overrides:
    `getLogger` in class `java.util.logging.LogManager`
  Parameters:
    `name` - The name of the logger to retrieve

### getLoggerNames

    public java.util.Enumeration<java.lang.String> getLoggerNames()

  Get an enumeration of the logger names currently defined in the classloader local configuration.

  Overrides:
    `getLoggerNames` in class `java.util.logging.LogManager`

### getProperty

    public java.lang.String getProperty(java.lang.String name)

  Get the value of the specified property in the classloader local configuration.

  Overrides:
    `getProperty` in class `java.util.logging.LogManager`
  Parameters:
    `name` - The property name

### readConfiguration

    public void readConfiguration()
                           throws java.io.IOException,
                                  java.lang.SecurityException

  Overrides:
    `readConfiguration` in class `java.util.logging.LogManager`
  Throws:
    `java.io.IOException`
    `java.lang.SecurityException`

### readConfiguration

    public void readConfiguration(java.io.InputStream is)
                           throws java.io.IOException,
                                  java.lang.SecurityException

  Overrides:
    `readConfiguration` in class `java.util.logging.LogManager`
  Throws:
    `java.io.IOException`
    `java.lang.SecurityException`

### getClassLoaderInfo

    protected ClassLoaderLogManager.ClassLoaderLogInfo getClassLoaderInfo(java.lang.ClassLoader classLoader)

  Retrieve the configuration associated with the specified classloader. If it does not exist, it will be created.

  Parameters:
    `classLoader` - The classloader for which we will retrieve or build the configuration

### readConfiguration

    protected void readConfiguration(java.lang.ClassLoader classLoader)
                              throws java.io.IOException

  Read configuration for the specified classloader.

  Parameters:
    `classLoader` -
  Throws:
    `java.io.IOException` - Errot

### readConfiguration

    protected void readConfiguration(java.io.InputStream is,
                                     java.lang.ClassLoader classLoader)
                              throws java.io.IOException

  Load specified configuration.

  Parameters:
    `is` - InputStream to the properties file
    `classLoader` - for which the configuration will be loaded
  Throws:
    `java.io.IOException` - If something wrong happens during loading

### doSetParentLogger

    protected static void doSetParentLogger(java.util.logging.Logger logger,
                                            java.util.logging.Logger parent)

  Set parent child relationship between the two specified loggers.

  Parameters:
    `logger` -
    `parent` -

### replace

    protected java.lang.String replace(java.lang.String str)

  System property replacement in the given string.

  Parameters:
    `str` - The original string
  Returns:
    the modified string

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.