public class LoggerUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FIXED_PREFIX |
static String |
NO_ENV |
| Constructor and Description |
|---|
LoggerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
envLogMsg(Level logLevel,
EnvironmentImpl envImpl,
String msg)
Use the environment logger.
|
static String |
exceptionTypeAndMsg(Exception e)
Displays both the exception class and the message.
|
static void |
fine(Logger useLogger,
EnvironmentImpl envImpl,
String msg) |
static void |
finer(Logger useLogger,
EnvironmentImpl envImpl,
String msg) |
static void |
finest(Logger useLogger,
EnvironmentImpl envImpl,
String msg) |
static void |
fullThreadDump(Logger logger,
EnvironmentImpl envImpl,
Level level)
Logs a full thread dump as if jstack were piped to the je.info file.
|
static Level |
getHandlerLevel(DbConfigManager configManager,
ConfigParam param,
String levelName) |
static Logger |
getLogger(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 Logger |
getLoggerFixedPrefix(Class<?> cl,
String prefix) |
static Logger |
getLoggerFixedPrefix(Class<?> cl,
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 Logger |
getLoggerFormatterNeeded(Class<?> cl)
Get a logger which only publishes to a console handler.
|
static String |
getLoggerProperty(String property) |
static Level |
getPushLevel(String name)
Get the push level for the MemoryHandler.
|
static String |
getStackTrace()
Return the stack trace of the caller, for debugging.
|
static String |
getStackTrace(Throwable t)
Return a String version of a stack trace
|
static void |
info(Logger useLogger,
EnvironmentImpl envImpl,
String msg) |
static void |
logMsg(Logger useLogger,
EnvironmentImpl envImpl,
Formatter formatter,
Level logLevel,
String msg)
Log a message using this logger.
|
static void |
logMsg(Logger useLogger,
EnvironmentImpl envImpl,
Level logLevel,
String msg)
Log a message using this logger.
|
static void |
logMsg(Logger useLogger,
Formatter formatter,
Level logLevel,
String msg)
Log a message with this logger.
|
static <T> void |
logMsg(RateLimitingLogger<T> useLogger,
EnvironmentImpl envImpl,
T object,
Level logLevel,
String msg)
Log a message using the given RateLimitingLogger.
|
static void |
severe(Logger useLogger,
EnvironmentImpl envImpl,
String msg) |
static void |
traceAndLog(Logger logger,
EnvironmentImpl envImpl,
Level logLevel,
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,
String sourceClass,
String sourceMethod,
String msg,
Throwable t)
Logger method for recording an exception and stacktrace to both the
java.util.logging system and the .jdb files.
|
static void |
warning(Logger useLogger,
EnvironmentImpl envImpl,
String msg) |
public static final String NO_ENV
public static final String FIXED_PREFIX
public static Logger getLogger(Class<?> cl)
public static Logger getLoggerFormatterNeeded(Class<?> cl)
public static Logger getLoggerFixedPrefix(Class<?> cl, String prefix, EnvironmentImpl envImpl)
public static Level getPushLevel(String name)
public static void logMsg(Logger useLogger, EnvironmentImpl envImpl, Level logLevel, String msg)
public static <T> void logMsg(RateLimitingLogger<T> useLogger, EnvironmentImpl envImpl, T object, Level logLevel, String msg)
public static void envLogMsg(Level logLevel, EnvironmentImpl envImpl, String msg)
public static void logMsg(Logger useLogger, EnvironmentImpl envImpl, Formatter formatter, Level logLevel, String msg)
public static void severe(Logger useLogger, EnvironmentImpl envImpl, String msg)
public static void warning(Logger useLogger, EnvironmentImpl envImpl, String msg)
public static void info(Logger useLogger, EnvironmentImpl envImpl, String msg)
public static void fine(Logger useLogger, EnvironmentImpl envImpl, String msg)
public static void finer(Logger useLogger, EnvironmentImpl envImpl, String msg)
public static void finest(Logger useLogger, EnvironmentImpl envImpl, String msg)
public static void logMsg(Logger useLogger, Formatter formatter, Level logLevel, String msg)
public static void traceAndLogException(EnvironmentImpl envImpl, String sourceClass, String sourceMethod, String msg, Throwable t)
public static void traceAndLog(Logger logger, EnvironmentImpl envImpl, Level logLevel, String msg)
public static String getStackTrace(Throwable t)
public static String getStackTrace()
public static Level getHandlerLevel(DbConfigManager configManager, ConfigParam param, String levelName)
public static void fullThreadDump(Logger logger, EnvironmentImpl envImpl, Level level)
Copyright © 2024. All rights reserved.