flux.logging
Enum LoggerType
java.lang.Object
java.lang.Enum<LoggerType>
flux.logging.LoggerType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<LoggerType>
public enum LoggerType
- extends java.lang.Enum<LoggerType>
An enumeration of the kinds of loggers that are supported. Supported loggers
include an internal asynchronous logger (LoggerType.INTERNAL_ASYNCHRONOUS),
an internal synchronous logger (LoggerType.INTERNAL_SYNCHRONOUS), Log4j
(LoggerType.LOG4J), the logging built into JDK 1.4 and higher
(LoggerType.JDK), a simple logger that prints stack traces to standard error
(LoggerType.STANDARD_ERROR), Apache Jakarta Commons Logging logger
(LoggerType.COMMONS_LOGGING), and a null logger that does nothing
(LoggerType.NULL).
- Author:
- Copyright 2014 Flux Corporation. All rights reserved.
Enum Constant Summary |
COMMONS_LOGGING
Uses the Apache Jakarta Commons Logging logger. |
INTERNAL_ASYNCHRONOUS
Uses an internal logger that logs information to the Flux database. |
INTERNAL_SYNCHRONOUS
Uses an internal logger that logs information to the Flux database. |
JDK
Uses the JDK 1.4+ logger. |
LOG4J
Uses the Log4j logger. |
NULL
Performs no logging. |
STANDARD_ERROR
Logs stack traces and errors at the WARNING and SEVERE logging levels
only. |
Method Summary |
static LoggerType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static LoggerType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
COMMONS_LOGGING
public static final LoggerType COMMONS_LOGGING
- Uses the Apache Jakarta Commons Logging logger.
INTERNAL_ASYNCHRONOUS
public static final LoggerType INTERNAL_ASYNCHRONOUS
- Uses an internal logger that logs information to the Flux database. Logging
operations are stored asynchronously to the database using a different
database connection from the database connection used by the Flux operation
that is being executed. This technique increases throughput while still
recording information that may be rolled back in the database connection
used by the Flux operation.
When this logger is used, the Flux logs at the SEVERE and WARNING logging
levels only are stored in the database. However, the complete Flux logs,
down to the FINEST logging level, are also stored in rotating log files on
the file system asynchronously. The active log file name is
"flux-<engine name>.log", where "<engine name>" is the name of
the engine that generated the log. The name of an engine is found in the
engine's configuration under the configuration property NAME.
Six daily log file rotations are stored using file names patterned after
"flux-<engine name>-<date>.log", where "<date>" is in the
form "day-month-year". The three letter month is written using the
localized month name.
Also when this logger is used, all the Flux audit trail entries are stored
in the database in their entirety.
- See Also:
Level.SEVERE
,
Level.WARNING
,
Configuration.ID_NAME
INTERNAL_SYNCHRONOUS
public static final LoggerType INTERNAL_SYNCHRONOUS
- Uses an internal logger that logs information to the Flux database. Logging
operations are stored synchronously to the database using the same database
connection as used by the Flux operation that is being executed. This
technique records information only if it is committed by the database
connection used by the Flux operation.
When this logger is used, the Flux logs at the SEVERE and WARNING logging
levels only are stored in the database. However, the complete Flux logs,
down to the FINEST logging level, are also stored in rotating log files on
the file system asynchronously. The active log file name is
"flux-<engine name>.log", where "<engine name>" is the name of
the engine that generated the log. The name of an engine is found in the
engine's configuration under the configuration property NAME.
Six daily log file rotations are stored using file names patterned after
"flux-<engine name>-<date>.log", where "<date>" is in the
form "day-month-year". The three letter month is written using the
localized month name.
Also when this logger is used, all the Flux audit trail entries are stored
in the database in their entirety.
- See Also:
Level.SEVERE
,
Level.WARNING
,
Configuration.ID_NAME
JDK
public static final LoggerType JDK
- Uses the JDK 1.4+ logger.
LOG4J
public static final LoggerType LOG4J
- Uses the Log4j logger.
NULL
public static final LoggerType NULL
- Performs no logging.
STANDARD_ERROR
public static final LoggerType STANDARD_ERROR
- Logs stack traces and errors at the WARNING and SEVERE logging levels
only.
values
public static LoggerType[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (LoggerType c : LoggerType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static LoggerType valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
© 2014 Flux Corporation. All rights reserved.