public class LogConfigurator
extends java.lang.Object
| Constructor | Description |
|---|---|
LogConfigurator() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
configure(Environment environment) |
Configure logging reading from any log4j2.properties found in the config directory and its
subdirectories from the specified environment.
|
static void |
configureWithoutConfig(Settings settings) |
Configure logging without reading a log4j2.properties file, effectively configuring the
status logger and all loggers to the console.
|
static void |
registerErrorListener() |
Registers a listener for status logger errors.
|
public static void registerErrorListener()
public static void configureWithoutConfig(Settings settings)
settings - for configuring logger.level and individual loggerspublic static void configure(Environment environment) throws java.io.IOException, UserException
environment - the environment for reading configs and the logs pathjava.io.IOException - if there is an issue readings any log4j2.properties in the config
directoryUserException - if there are no log4j2.properties in the specified configs path