public class LoggingSystemProperties extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONSOLE_LOG_CHARSET
The name of the System property that contains the console log charset.
|
static String |
CONSOLE_LOG_PATTERN
The name of the System property that contains the console log pattern.
|
static String |
EXCEPTION_CONVERSION_WORD
The name of the System property that contains the exception conversion word.
|
static String |
FILE_LOG_CHARSET
The name of the System property that contains the file log charset.
|
static String |
FILE_LOG_PATTERN
The name of the System property that contains the file log pattern.
|
static String |
LOG_DATEFORMAT_PATTERN
The name of the System property that contains the log date-format pattern.
|
static String |
LOG_FILE
The name of the System property that contains the log file.
|
static String |
LOG_LEVEL_PATTERN
The name of the System property that contains the log level pattern.
|
static String |
LOG_PATH
The name of the System property that contains the log path.
|
static String |
PID_KEY
The name of the System property that contains the process ID.
|
Constructor and Description |
---|
LoggingSystemProperties(Environment environment)
Create a new
LoggingSystemProperties instance. |
LoggingSystemProperties(Environment environment,
BiConsumer<String,String> setter)
Create a new
LoggingSystemProperties instance. |
Modifier and Type | Method and Description |
---|---|
void |
apply() |
void |
apply(LogFile logFile) |
protected void |
apply(LogFile logFile,
PropertyResolver resolver) |
protected Charset |
getDefaultCharset() |
protected void |
setSystemProperty(PropertyResolver resolver,
String systemPropertyName,
String propertyName) |
protected void |
setSystemProperty(PropertyResolver resolver,
String systemPropertyName,
String propertyName,
String defaultValue) |
protected void |
setSystemProperty(String name,
String value) |
public static final String PID_KEY
public static final String EXCEPTION_CONVERSION_WORD
public static final String LOG_FILE
public static final String LOG_PATH
public static final String CONSOLE_LOG_PATTERN
public static final String CONSOLE_LOG_CHARSET
public static final String FILE_LOG_PATTERN
public static final String FILE_LOG_CHARSET
public static final String LOG_LEVEL_PATTERN
public static final String LOG_DATEFORMAT_PATTERN
public LoggingSystemProperties(Environment environment)
LoggingSystemProperties
instance.environment
- the source environmentpublic LoggingSystemProperties(Environment environment, BiConsumer<String,String> setter)
LoggingSystemProperties
instance.environment
- the source environmentsetter
- setter used to apply the propertyprotected Charset getDefaultCharset()
public final void apply()
public final void apply(LogFile logFile)
protected void apply(LogFile logFile, PropertyResolver resolver)
protected final void setSystemProperty(PropertyResolver resolver, String systemPropertyName, String propertyName)
protected final void setSystemProperty(PropertyResolver resolver, String systemPropertyName, String propertyName, String defaultValue)