| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | Hierarchy.InnerLoggerListener
Inner class to redirect to hierarchys real LoggerListener if any. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Hierarchy | |
| public static final String | |
| private ErrorHandler | |
| private LoggerListener | |
| private Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | addLoggerListener(final LoggerListener
the LoggerListener loggerListener)Set the LoggerListener associated with hierarchy. |
| public static Hierarchy | |
| public Logger | Returns: the Loggerthe context category)Retrieve a logger for named category. |
| public final Logger | |
| private synchronized void | notifyLoggerCreated(final String
the category of new logger category, final Logger the logger logger)Notify logger listener (if any) that a new logger was created. |
| public synchronized void | removeLoggerListener(final LoggerListener
the LoggerListener loggerListener)Remove the LoggerListener associated with hierarchy. |
| public void | setDefaultLogTarget(final LogTarget
the default target target)Set the default log target for hierarchy. |
| public void | setDefaultLogTargets(final LogTarget[]
the default targets targets)Set the default log targets for this hierarchy. |
| public void | setDefaultPriority(final Priority
the default priority priority)Set the default priority for hierarchy. |
| public void | setErrorHandler(final ErrorHandler
the ErrorHandler errorHandler)Set the ErrorHandler associated with hierarchy. |
| c_hierarchy | back to summary |
|---|---|
| private static final Hierarchy c_hierarchy | |
| DEFAULT_FORMAT | back to summary |
|---|---|
| public static final String DEFAULT_FORMAT | |
| m_errorHandler | back to summary |
|---|---|
| private ErrorHandler m_errorHandler | |
| m_loggerListener | back to summary |
|---|---|
| private LoggerListener m_loggerListener | |
| m_rootLogger | back to summary |
|---|---|
| private Logger m_rootLogger | |
| Hierarchy | back to summary |
|---|---|
| public Hierarchy() Create a hierarchy object. The default LogTarget writes to stdout. | |
| addLoggerListener | back to summary |
|---|---|
| public synchronized void addLoggerListener(final LoggerListener loggerListener) Set the LoggerListener associated with hierarchy. This is a unicast listener, so only one LoggerListener is allowed.
| |
| getDefaultHierarchy | back to summary |
|---|---|
| public static Hierarchy getDefaultHierarchy() Retrieve the default hierarchy. In most cases the default LogHierarchy is the only one used in an application. However when security is a concern or multiple independent applications will be running in same JVM it is advantageous to create new Hierarchies rather than reuse default.
| |
| getLoggerFor | back to summary |
|---|---|
| public Logger getLoggerFor(final String category) Retrieve a logger for named category. | |
| getRootLogger | back to summary |
|---|---|
| public final Logger getRootLogger() Utility method to retrieve logger for hierarchy. This method is intended for use by sub-classes which can take responsibility for manipulating Logger directly.
| |
| notifyLoggerCreated | back to summary |
|---|---|
| private synchronized void notifyLoggerCreated(final String category, final Logger logger) Notify logger listener (if any) that a new logger was created. | |
| removeLoggerListener | back to summary |
|---|---|
| public synchronized void removeLoggerListener(final LoggerListener loggerListener) Remove the LoggerListener associated with hierarchy. Perform this step before adding a new one if you want to change it.
| |
| setDefaultLogTarget | back to summary |
|---|---|
| public void setDefaultLogTarget(final LogTarget target) Set the default log target for hierarchy. This is the target inherited by loggers if no other target is specified.
| |
| setDefaultLogTargets | back to summary |
|---|---|
| public void setDefaultLogTargets(final LogTarget[] targets) Set the default log targets for this hierarchy. These are the targets inherited by loggers if no other targets are specified
| |
| setDefaultPriority | back to summary |
|---|---|
| public void setDefaultPriority(final Priority priority) Set the default priority for hierarchy. This is the priority inherited by loggers if no other priority is specified.
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(final ErrorHandler errorHandler) Set the ErrorHandler associated with hierarchy.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | error(final String
the error message message, final Throwable the exception associated with error (may be null) throwable, final LogEvent the LogEvent that caused error, if any (may be null) event)Implements org. |
| InnerErrorHandler | back to summary |
|---|---|
| private InnerErrorHandler() | |
| error | back to summary |
|---|---|
| public void error(final String message, final Throwable throwable, final LogEvent event) Implements org. Log an unrecoverable error. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | loggerCreated(final String
the category of logger category, final Logger the logger object logger)Implements abstract org. |
| InnerLoggerListener | back to summary |
|---|---|
| private InnerLoggerListener() | |
| loggerCreated | back to summary |
|---|---|
| public void loggerCreated(final String category, final Logger logger) Implements abstract org. Notify listener that a logger was created. | |