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_CLEAN_HISTORY_ON_START
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_CLEAN_HISTORY_ON_START |
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 |
FILE_MAX_HISTORY
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_HISTORY |
static String |
FILE_MAX_SIZE
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_FILE_SIZE |
static String |
FILE_TOTAL_SIZE_CAP
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_TOTAL_SIZE_CAP |
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.
|
static String |
ROLLING_FILE_NAME_PATTERN
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_FILE_NAME_PATTERN |
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
@Deprecated public static final String ROLLING_FILE_NAME_PATTERN
LogbackLoggingSystemProperties.ROLLINGPOLICY_FILE_NAME_PATTERN
@Deprecated public static final String FILE_CLEAN_HISTORY_ON_START
LogbackLoggingSystemProperties.ROLLINGPOLICY_CLEAN_HISTORY_ON_START
@Deprecated public static final String FILE_MAX_SIZE
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_FILE_SIZE
@Deprecated public static final String FILE_TOTAL_SIZE_CAP
LogbackLoggingSystemProperties.ROLLINGPOLICY_TOTAL_SIZE_CAP
@Deprecated public static final String FILE_MAX_HISTORY
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_HISTORY
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)