public final class StartupLoggingUtils extends Object
WARNING: This class should only be used during startup. For modifying log levels etc during runtime, SLF4J and LogWatcher must be used.
Constructor and Description |
---|
StartupLoggingUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
changeLogLevel(String logLevel)
Dynamically change log4j log level through property solr.log.level
|
static void |
checkLogDir()
Checks whether mandatory log dir is given
|
static void |
flushAllLoggers()
This is primarily for tests to insure that log messages don't bleed from one test case to another, see:
SOLR-13268.
|
static String |
getLoggerImplStr() |
static String |
getLogLevelString()
Return a string representing the current static ROOT logging level
|
static boolean |
muteConsole()
Disables all log4j2 ConsoleAppender's by modifying log4j configuration dynamically.
|
static void |
shutdown()
Perhaps odd to put in startup utils, but this is where the logging-init code is so it seems logical to put the
shutdown here too.
|
public static void checkLogDir()
public static String getLoggerImplStr()
public static boolean muteConsole()
public static boolean changeLogLevel(String logLevel)
logLevel
- String with level, should be one of the supported, e.g. TRACE, DEBUG, INFO, WARN, ERROR...public static void shutdown()
public static void flushAllLoggers()
public static String getLogLevelString()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.