public class LoggingSystemProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONSOLE_LOG_CHARSET
The name of the System property that contains the console log charset.
|
static java.lang.String |
CONSOLE_LOG_PATTERN
The name of the System property that contains the console log pattern.
|
static java.lang.String |
EXCEPTION_CONVERSION_WORD
The name of the System property that contains the exception conversion word.
|
static java.lang.String |
FILE_CLEAN_HISTORY_ON_START
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_CLEAN_HISTORY_ON_START |
static java.lang.String |
FILE_LOG_CHARSET
The name of the System property that contains the file log charset.
|
static java.lang.String |
FILE_LOG_PATTERN
The name of the System property that contains the file log pattern.
|
static java.lang.String |
FILE_MAX_HISTORY
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_HISTORY |
static java.lang.String |
FILE_MAX_SIZE
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_FILE_SIZE |
static java.lang.String |
FILE_TOTAL_SIZE_CAP
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_TOTAL_SIZE_CAP |
static java.lang.String |
LOG_DATEFORMAT_PATTERN
The name of the System property that contains the log date-format pattern.
|
static java.lang.String |
LOG_FILE
The name of the System property that contains the log file.
|
static java.lang.String |
LOG_LEVEL_PATTERN
The name of the System property that contains the log level pattern.
|
static java.lang.String |
LOG_PATH
The name of the System property that contains the log path.
|
static java.lang.String |
PID_KEY
The name of the System property that contains the process ID.
|
static java.lang.String |
ROLLING_FILE_NAME_PATTERN
Deprecated.
since 2.4.0 in favor of
LogbackLoggingSystemProperties.ROLLINGPOLICY_FILE_NAME_PATTERN |
Constructor and Description |
---|
LoggingSystemProperties(org.springframework.core.env.Environment environment)
Create a new
LoggingSystemProperties instance. |
LoggingSystemProperties(org.springframework.core.env.Environment environment,
java.util.function.BiConsumer<java.lang.String,java.lang.String> setter)
Create a new
LoggingSystemProperties instance. |
Modifier and Type | Method and Description |
---|---|
void |
apply() |
void |
apply(LogFile logFile) |
protected void |
apply(LogFile logFile,
org.springframework.core.env.PropertyResolver resolver) |
protected java.nio.charset.Charset |
getDefaultCharset() |
protected void |
setSystemProperty(org.springframework.core.env.PropertyResolver resolver,
java.lang.String systemPropertyName,
java.lang.String propertyName) |
protected void |
setSystemProperty(org.springframework.core.env.PropertyResolver resolver,
java.lang.String systemPropertyName,
java.lang.String propertyName,
java.lang.String defaultValue) |
protected void |
setSystemProperty(java.lang.String name,
java.lang.String value) |
public static final java.lang.String PID_KEY
public static final java.lang.String EXCEPTION_CONVERSION_WORD
public static final java.lang.String LOG_FILE
public static final java.lang.String LOG_PATH
public static final java.lang.String CONSOLE_LOG_PATTERN
public static final java.lang.String CONSOLE_LOG_CHARSET
public static final java.lang.String FILE_LOG_PATTERN
public static final java.lang.String FILE_LOG_CHARSET
@Deprecated public static final java.lang.String ROLLING_FILE_NAME_PATTERN
LogbackLoggingSystemProperties.ROLLINGPOLICY_FILE_NAME_PATTERN
@Deprecated public static final java.lang.String FILE_CLEAN_HISTORY_ON_START
LogbackLoggingSystemProperties.ROLLINGPOLICY_CLEAN_HISTORY_ON_START
@Deprecated public static final java.lang.String FILE_MAX_SIZE
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_FILE_SIZE
@Deprecated public static final java.lang.String FILE_TOTAL_SIZE_CAP
LogbackLoggingSystemProperties.ROLLINGPOLICY_TOTAL_SIZE_CAP
@Deprecated public static final java.lang.String FILE_MAX_HISTORY
LogbackLoggingSystemProperties.ROLLINGPOLICY_MAX_HISTORY
public static final java.lang.String LOG_LEVEL_PATTERN
public static final java.lang.String LOG_DATEFORMAT_PATTERN
public LoggingSystemProperties(org.springframework.core.env.Environment environment)
LoggingSystemProperties
instance.environment
- the source environmentpublic LoggingSystemProperties(org.springframework.core.env.Environment environment, java.util.function.BiConsumer<java.lang.String,java.lang.String> setter)
LoggingSystemProperties
instance.environment
- the source environmentsetter
- setter used to apply the propertyprotected java.nio.charset.Charset getDefaultCharset()
public final void apply()
public final void apply(LogFile logFile)
protected void apply(LogFile logFile, org.springframework.core.env.PropertyResolver resolver)
protected final void setSystemProperty(org.springframework.core.env.PropertyResolver resolver, java.lang.String systemPropertyName, java.lang.String propertyName)
protected final void setSystemProperty(org.springframework.core.env.PropertyResolver resolver, java.lang.String systemPropertyName, java.lang.String propertyName, java.lang.String defaultValue)
protected final void setSystemProperty(java.lang.String name, java.lang.String value)