public class LogConfigurator
extends java.lang.Object
| Constructor and Description |
|---|
LogConfigurator() |
| Modifier and Type | Method and 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.
|
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