LoggerContext implementation.
| Modifier and Type | Field and Description |
|---|---|
| private final String | dateTimeFormat
The date and time format to use in the log message |
| protected static final String | DEFAULT_DATE_TIME_FORMAT
The default format to use when formatting dates |
| private final Level | |
| pack-priv static final SimpleLoggerContext | INSTANCE
Singleton instance. |
| private final LoggerRegistry | |
| private final PropertiesUtil | |
| private final boolean | showContextMap
Include the ThreadContextMap in the log message |
| private final boolean | showDateTime
Include the current time in the log message |
| private final boolean | showLogName
Include the instance name in the log message? |
| private final boolean | showShortName
Include the short name (last component) of the logger in the log message. |
| private final PrintStream | |
| private static final String | |
| private static final String | |
| protected static final String | SYSTEM_PREFIX
All system properties used by |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getExternalContext()
Implements org. Gets the anchor for some other context, such as a ClassLoader or ServletContext. |
| public ExtendedLogger | getLogger(final String
The name of the Logger to return. name)Implements org. Gets an ExtendedLogger. |
| public ExtendedLogger | getLogger(final String
The name of the Logger to return. name, final MessageFactory The message factory is used only when creating a logger, subsequent use does not change
the logger but will log a warning if mismatched. messageFactory)Implements org. Gets an ExtendedLogger. |
| public LoggerRegistry | Returns: the LoggerRegistry.Overrides default org. Gets the LoggerRegistry. |
| public boolean | hasLogger(final String
The Logger name to search for. name)Implements org. Tests if a Logger with the specified name exists. |
| public boolean | hasLogger(final String
The Logger name to search for. name, final Class<? extends MessageFactory> The message factory class to search for. messageFactoryClass)Implements org. Tests if a Logger with the specified name and MessageFactory type exists. |
| public boolean | hasLogger(final String
The Logger name to search for. name, final MessageFactory The message factory to search for. messageFactory)Implements org. Tests if a Logger with the specified name and MessageFactory exists. |
| dateTimeFormat | back to summary |
|---|---|
| private final String dateTimeFormat The date and time format to use in the log message | |
| DEFAULT_DATE_TIME_FORMAT | back to summary |
|---|---|
| protected static final String DEFAULT_DATE_TIME_FORMAT The default format to use when formatting dates | |
| defaultLevel | back to summary |
|---|---|
| private final Level defaultLevel | |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final SimpleLoggerContext INSTANCE Singleton instance. | |
| loggerRegistry | back to summary |
|---|---|
| private final LoggerRegistry<ExtendedLogger> loggerRegistry | |
| props | back to summary |
|---|---|
| private final PropertiesUtil props | |
| showContextMap | back to summary |
|---|---|
| private final boolean showContextMap Include the ThreadContextMap in the log message | |
| showDateTime | back to summary |
|---|---|
| private final boolean showDateTime Include the current time in the log message | |
| showLogName | back to summary |
|---|---|
| private final boolean showLogName Include the instance name in the log message? | |
| showShortName | back to summary |
|---|---|
| private final boolean showShortName Include the short name (last component) of the logger in the log message. Defaults to true - otherwise we'll be lost in a flood of messages without knowing who sends them. | |
| stream | back to summary |
|---|---|
| private final PrintStream stream | |
| SYSTEM_ERR | back to summary |
|---|---|
| private static final String SYSTEM_ERR | |
| SYSTEM_OUT | back to summary |
|---|---|
| private static final String SYSTEM_OUT | |
| SYSTEM_PREFIX | back to summary |
|---|---|
| protected static final String SYSTEM_PREFIX All system properties used by | |
| SimpleLoggerContext | back to summary |
|---|---|
| public SimpleLoggerContext() Constructs a new initialized instance.
| |
| getExternalContext | back to summary |
|---|---|
| public Object getExternalContext() Implements org. Doc from org. Gets the anchor for some other context, such as a ClassLoader or ServletContext. | |
| getLogger | back to summary |
|---|---|
| public ExtendedLogger getLogger(final String name) Implements org. Doc from org. Gets an ExtendedLogger.
| |
| getLogger | back to summary |
|---|---|
| public ExtendedLogger getLogger(final String name, final MessageFactory messageFactory) Implements org. Doc from org. Gets an ExtendedLogger.
| |
| getLoggerRegistry | back to summary |
|---|---|
| public LoggerRegistry Overrides default org. Gets the LoggerRegistry.
| |
| hasLogger | back to summary |
|---|---|
| public boolean hasLogger(final String name) Implements org. Doc from org. Tests if a Logger with the specified name exists. | |
| hasLogger | back to summary |
|---|---|
| public boolean hasLogger(final String name, final Class<? extends MessageFactory> messageFactoryClass) Implements org. Doc from org. Tests if a Logger with the specified name and MessageFactory type exists.
| |
| hasLogger | back to summary |
|---|---|
| public boolean hasLogger(final String name, final MessageFactory messageFactory) Implements org. Doc from org. Tests if a Logger with the specified name and MessageFactory exists.
| |