The initial log context will be configured using a context initializer that is located via the JDK SPI mechanism.
This interface is intended to be forward-extensible. If new methods are added, they will include a default implementation.
Implementations of this interface should accommodate the possibility of new methods being added; as a matter of convention,
such methods should begin with the prefix getInitial, which will minimize the possibility of conflict.
| Modifier and Type | Field and Description |
|---|---|
| public static final LogContextInitializer | DEFAULT
The default log context initializer, which is used when none is specified. |
| public static final Handler[] | NO_HANDLERS
An array containing zero handlers. |
| Modifier and Type | Method and Description |
|---|---|
| public default Handler[] | Returns: the handlers to use (should not benull)the logger name (must not be loggerName)null)Get the initial set of handlers to configure for the given logger name. |
| public default Level | Returns: the level to use, ornull to inherit the level from the parentthe logger name (must not be loggerName)null)Get the initial level for the given logger name. |
| public default Level | Returns: the level to use, ornull to inherit the level from the parentthe logger name (must not be loggerName)null)Get the minimum (most verbose) level allowed for the given logger name. |
| public default boolean | Returns: true to use strong references, or false to use weak referencesEstablish whether strong references should be used for logger nodes. |
| DEFAULT | back to summary |
|---|---|
| public static final LogContextInitializer DEFAULT The default log context initializer, which is used when none is specified. This instance uses only default implementations for all the given methods. | |
| NO_HANDLERS | back to summary |
|---|---|
| public static final Handler[] NO_HANDLERS An array containing zero handlers. | |
| getInitialHandlers | back to summary |
|---|---|
| public default Handler[] getInitialHandlers(String loggerName) Get the initial set of handlers to configure for the given logger name.
The default implementation returns | |
| getInitialLevel | back to summary |
|---|---|
| public default Level getInitialLevel(String loggerName) Get the initial level for the given logger name. If the initializer returns a
The default implementation returns | |
| getMinimumLevel | back to summary |
|---|---|
| public default Level getMinimumLevel(String loggerName) Get the minimum (most verbose) level allowed for the given logger name. If the initializer returns a
The default implementation returns | |
| useStrongReferences | back to summary |
|---|---|
| public default boolean useStrongReferences() Establish whether strong references should be used for logger nodes.
| |