public class LoggerUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static java.util.Map<java.lang.Thread,EnvironmentImpl> |
envMap |
static java.lang.String |
FIXED_PREFIX |
(package private) static java.util.Map<java.lang.Thread,java.util.logging.Formatter> |
formatterMap |
static java.lang.String |
NO_ENV |
Constructor and Description |
---|
LoggerUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
envLogMsg(java.util.logging.Level logLevel,
EnvironmentImpl envImpl,
java.lang.String msg)
Use the environment logger.
|
static void |
fine(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.lang.String msg) |
static void |
finer(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.lang.String msg) |
static void |
finest(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.lang.String msg) |
static java.util.logging.Level |
getHandlerLevel(DbConfigManager configManager,
ConfigParam param,
java.lang.String levelName) |
static java.util.logging.Logger |
getLogger(java.lang.Class<?> cl)
Get a logger which is configured to use the shared console, memory, and
file handlers of an EnvironmentImpl and prefixes all messages with an
environment identifier.
|
static java.util.logging.Logger |
getLoggerFixedPrefix(java.lang.Class<?> cl,
java.lang.String prefix) |
static java.util.logging.Logger |
getLoggerFixedPrefix(java.lang.Class<?> cl,
java.lang.String prefix,
EnvironmentImpl envImpl)
Get a logger that uses the generic console handler, with no attempt to
use thread local state to customize the message prefix.
|
static java.util.logging.Logger |
getLoggerFormatterNeeded(java.lang.Class<?> cl)
Get a logger which only publishes to a console handler.
|
static java.lang.String |
getLoggerProperty(java.lang.String property) |
static java.util.logging.Level |
getPushLevel(java.lang.String name)
Get the push level for the MemoryHandler.
|
static java.lang.String |
getStackTrace()
Return the stack trace of the caller, for debugging.
|
static java.lang.String |
getStackTrace(java.lang.Throwable t)
Return a String version of a stack trace
|
static void |
info(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.lang.String msg) |
static void |
logMsg(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.util.logging.Formatter formatter,
java.util.logging.Level logLevel,
java.lang.String msg)
Log a message using this logger.
|
static void |
logMsg(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.util.logging.Level logLevel,
java.lang.String msg)
Log a message using this logger.
|
static void |
logMsg(java.util.logging.Logger useLogger,
java.util.logging.Formatter formatter,
java.util.logging.Level logLevel,
java.lang.String msg)
Log a message with this logger.
|
static void |
severe(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.lang.String msg) |
static void |
traceAndLog(java.util.logging.Logger logger,
EnvironmentImpl envImpl,
java.util.logging.Level logLevel,
java.lang.String msg)
Records a message both to the java.util.logging loggers and through
the trace system which writes to the .jdb files.
|
static void |
traceAndLogException(EnvironmentImpl envImpl,
java.lang.String sourceClass,
java.lang.String sourceMethod,
java.lang.String msg,
java.lang.Throwable t)
Logger method for recording an exception and stacktrace to both the
java.util.logging system and the .jdb files.
|
static void |
warning(java.util.logging.Logger useLogger,
EnvironmentImpl envImpl,
java.lang.String msg) |
static java.util.Map<java.lang.Thread,EnvironmentImpl> envMap
static java.util.Map<java.lang.Thread,java.util.logging.Formatter> formatterMap
public static final java.lang.String NO_ENV
public static final java.lang.String FIXED_PREFIX
public static java.util.logging.Logger getLogger(java.lang.Class<?> cl)
public static java.util.logging.Logger getLoggerFormatterNeeded(java.lang.Class<?> cl)
public static java.util.logging.Logger getLoggerFixedPrefix(java.lang.Class<?> cl, java.lang.String prefix)
public static java.util.logging.Logger getLoggerFixedPrefix(java.lang.Class<?> cl, java.lang.String prefix, EnvironmentImpl envImpl)
public static java.lang.String getLoggerProperty(java.lang.String property)
public static java.util.logging.Level getPushLevel(java.lang.String name)
public static void logMsg(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.util.logging.Level logLevel, java.lang.String msg)
public static void envLogMsg(java.util.logging.Level logLevel, EnvironmentImpl envImpl, java.lang.String msg)
public static void logMsg(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.util.logging.Formatter formatter, java.util.logging.Level logLevel, java.lang.String msg)
public static void severe(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.lang.String msg)
public static void warning(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.lang.String msg)
public static void info(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.lang.String msg)
public static void fine(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.lang.String msg)
public static void finer(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.lang.String msg)
public static void finest(java.util.logging.Logger useLogger, EnvironmentImpl envImpl, java.lang.String msg)
public static void logMsg(java.util.logging.Logger useLogger, java.util.logging.Formatter formatter, java.util.logging.Level logLevel, java.lang.String msg)
public static void traceAndLogException(EnvironmentImpl envImpl, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String msg, java.lang.Throwable t)
public static void traceAndLog(java.util.logging.Logger logger, EnvironmentImpl envImpl, java.util.logging.Level logLevel, java.lang.String msg)
public static java.lang.String getStackTrace(java.lang.Throwable t)
public static java.lang.String getStackTrace()
public static java.util.logging.Level getHandlerLevel(DbConfigManager configManager, ConfigParam param, java.lang.String levelName)
Copyright (c) 2004-2012 Oracle. All rights reserved.