public final class LogConfigurer extends Object
logback.configurationFile
system property when a
logback[.env].xml
file is found at user.dir/conf
directory or
user.dir
.
Initializes the log4j.configurationFile
system property when a
log4j[.env].[ext]
file is found at user.dir/conf
directory or
user.dir
. Extension can be one of: .xml
, .properties
,
.yaml
or .json
.
NOTE: This class must be call it before instantiating a logger instance. Otherwise, this setup
is completely ignored.Modifier and Type | Method and Description |
---|---|
static void |
configure(List<String> names)
Initializes the
logback.configurationFile system property when a
logback[.env].xml file is found at user.dir/conf directory or
user.dir . |
public static void configure(@Nonnull List<String> names)
logback.configurationFile
system property when a
logback[.env].xml
file is found at user.dir/conf
directory or
user.dir
.
Initializes the log4j.configurationFile
system property when a
log4j[.env].[ext]
file is found at user.dir/conf
directory or
user.dir
. Extension can be one of: .xml
, .properties
,
.yaml
or .json
.names
- Actives environment names. Useful for choosing an environment specific logging
configuration file.Copyright © 2020. All rights reserved.