|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.portal.log.LogManager
public final class LogManager
In AS 11, all logging implementation should use the standard JUL(java.util.
logging) and ODL. The level defined in this class is therefore converted to
JUL Levels.
Original comments of this class:
LogManager is a configurable logging service that allows you to log
messages at 7 different levels ranging from configuration to debug.
To configure LogManager, you must provide an implementation of the Logger
class. It is the Logger that performs the actual logging.
The LogManager is initialized by calling the init(Logger)
method and
destroyed by calling the destroyAll()
or destroy(String)
method.
It is important that calls to LogManager can be made AT ANY TIME regardless
of the initialization state of the LogManager. For this reason, When a
LogManager is created, it uses a NullLogger that "swallows" any messages
logged to it.
IMPORTANT: The semantics of LogManager do not allow any exceptions to be
thrown. Any failures should be logged (if possible) and swallowed.
A configuration issue in LogManager or a Logger should not
interfere with the operation of any clients
Field Summary | |
---|---|
static int |
LOG_LEVEL_CONFIG
|
static int |
LOG_LEVEL_DEBUG
|
static int |
LOG_LEVEL_ERROR
|
static int |
LOG_LEVEL_EXCEPTION
|
static int |
LOG_LEVEL_INFO
|
static int |
LOG_LEVEL_PERF
|
static int |
LOG_LEVEL_PERF_DETAIL
|
static int |
LOG_LEVEL_WARNING
|
Method Summary | |
---|---|
static void |
config(java.lang.String message)
Logs the given message. |
static void |
config(java.lang.String message,
java.lang.Throwable throwable)
Logs the given java.lang.Throwable object, e.g. by logging
the stack trace, along with the given message. |
static void |
debug(java.lang.String message)
Logs the given message. |
static void |
destroy(java.lang.String context)
destroy a specified configured Logger |
static void |
destroyAll()
destroy all configured loggers. |
static LogManager |
getInstance()
returns a LogManager instance. |
static Logger |
getLogger()
returns the logger associated with the current thread. |
static Logger |
getLogger(java.lang.String context)
returns the logger associated with the specified context. |
static void |
info(java.lang.String message)
Logs the given message. |
static java.lang.String |
init(Logger logger)
Perform one-time initialization for a new LogManager context. |
static void |
initCurrentThread(java.lang.String context,
MessageContext msgContext)
Do per-thread initialization of the LogManager. |
static boolean |
isConfigEnabled()
Returns true if Configuration level logging is enabled. |
static boolean |
isDebugEnabled()
Returns true if Debug level logging is enabled. |
static boolean |
isInfoEnabled()
Returns true if Information level logging is enabled. |
static boolean |
isPerfDetailEnabled()
Returns true if perf_detail level logging is enabled. |
static boolean |
isPerfEnabled()
Returns true if Performance level logging is enabled. |
static boolean |
isSevereEnabled()
Returns true if Severe Error level logging is enabled. |
static boolean |
isThrowingEnabled()
Returns true if Throwing (exception) level logging is enabled, otherwise false. |
static boolean |
isWarningEnabled()
Returns true if Warning level logging is enabled. |
static void |
log(java.lang.String message)
Logs the given message. |
static void |
log(java.lang.String message,
java.lang.Throwable throwable)
Logs the given java.lang.Throwable object, e.g. by logging
the stack trace, along with the given message. |
static void |
perf(java.lang.String message)
Logs the given message. |
static void |
perfdetail(java.lang.String message)
Logs the given message. |
static void |
resetCurrentThread()
Do per-thread clean-up to prevent accidental carry-over of context values when this thread is re-used (eg for another request). |
static void |
severe(java.lang.String message)
Logs the given message. |
static void |
severe(java.lang.String message,
java.lang.Throwable throwable)
Logs the given java.lang.Throwable object, e.g. by logging
the stack trace, along with the given message. |
static void |
throwing(java.lang.String message,
java.lang.Throwable throwable)
|
static void |
warning(java.lang.String message)
Logs the given message. |
static void |
warning(java.lang.String message,
java.lang.Throwable throwable)
Logs the given java.lang.Throwable object, e.g. by logging
the stack trace, along with the given message. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int LOG_LEVEL_ERROR
public static int LOG_LEVEL_WARNING
public static int LOG_LEVEL_INFO
public static int LOG_LEVEL_CONFIG
public static int LOG_LEVEL_DEBUG
public static int LOG_LEVEL_EXCEPTION
public static int LOG_LEVEL_PERF
public static int LOG_LEVEL_PERF_DETAIL
Method Detail |
---|
public static java.lang.String init(Logger logger)
logger
- the pre-initialized Logger that should be associated with
the new context
public static void initCurrentThread(java.lang.String context, MessageContext msgContext)
context
- identifier of the logging context to be associated with
the calling threadmsgContext
- MessageContext to be used by the Logger when logging
messages from the calling threadpublic static void resetCurrentThread()
public static void destroyAll()
public static void destroy(java.lang.String context)
context
- the context name of the Logger to be destroyedpublic static LogManager getInstance()
public static Logger getLogger()
initCurrentThread(String, MessageContext)
has not been called
for the current thread, the NullLogger will be returned
public static Logger getLogger(java.lang.String context)
initCurrentThread(String, MessageContext)
has not been
called for the current thread, the NullLogger will be returned
context
- context identifier for the requested Logger
public static void log(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void log(java.lang.String message, java.lang.Throwable throwable)
java.lang.Throwable
object, e.g. by logging
the stack trace, along with the given message. The object implementing
Logger
used by this LogManager
is declared and
configured in the LogManager XML Definition.
message
- explanatory message.throwable
- a Throwable
exception.public static void config(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void config(java.lang.String message, java.lang.Throwable throwable)
java.lang.Throwable
object, e.g. by logging
the stack trace, along with the given message. The object implementing
Logger
used by this LogManager
is declared and
configured in the LogManager XML Definition.
message
- explanatory message.throwable
- a Throwable
exception.public static void severe(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void severe(java.lang.String message, java.lang.Throwable throwable)
java.lang.Throwable
object, e.g. by logging
the stack trace, along with the given message. The object implementing
Logger
used by this LogManager
is declared and
configured in the LogManager XML Definition.
message
- explanatory message.throwable
- a Throwable
exception.public static void warning(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void warning(java.lang.String message, java.lang.Throwable throwable)
java.lang.Throwable
object, e.g. by logging
the stack trace, along with the given message. The object implementing
Logger
used by this LogManager
is declared and
configured in the LogManager XML Definition.
message
- explanatory message.throwable
- a Throwable
exception.public static void throwing(java.lang.String message, java.lang.Throwable throwable)
message
- explanatory message.throwable
- a Throwable
exception.public static void info(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void perf(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void perfdetail(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static void debug(java.lang.String message)
Logger
used by
this LogManager
is declared and configured in the
LogManager XML Definition.
message
- message to log.public static boolean isConfigEnabled()
public static boolean isSevereEnabled()
public static boolean isThrowingEnabled()
public static boolean isWarningEnabled()
public static boolean isInfoEnabled()
public static boolean isPerfEnabled()
public static boolean isPerfDetailEnabled()
public static boolean isDebugEnabled()
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |