public class LogFile extends Object
logging.file.name
or logging.file.path
Environment
properties.
If the logging.file.name
property is not specified "spring.log"
will be
written in the logging.file.path
directory.get(PropertyResolver)
Modifier and Type | Field and Description |
---|---|
static String |
FILE_NAME_PROPERTY
The name of the Spring property that contains the name of the log file.
|
static String |
FILE_PATH_PROPERTY
The name of the Spring property that contains the directory where log files are
written.
|
static String |
FILE_PROPERTY
Deprecated.
since 2.2.0 in favor of
FILE_NAME_PROPERTY |
static String |
PATH_PROPERTY
Deprecated.
since 2.2.0 in favor of
FILE_PATH_PROPERTY |
Modifier and Type | Method and Description |
---|---|
void |
applyTo(Properties properties)
Apply log file details to
LOG_PATH and LOG_FILE map entries. |
void |
applyToSystemProperties()
Apply log file details to
LOG_PATH and LOG_FILE system properties. |
static LogFile |
get(org.springframework.core.env.PropertyResolver propertyResolver)
Get a
LogFile from the given Spring Environment . |
String |
toString() |
@Deprecated public static final String FILE_PROPERTY
FILE_NAME_PROPERTY
@Deprecated public static final String PATH_PROPERTY
FILE_PATH_PROPERTY
public static final String FILE_NAME_PROPERTY
public static final String FILE_PATH_PROPERTY
public void applyToSystemProperties()
LOG_PATH
and LOG_FILE
system properties.public void applyTo(Properties properties)
LOG_PATH
and LOG_FILE
map entries.properties
- the properties to apply topublic static LogFile get(org.springframework.core.env.PropertyResolver propertyResolver)
LogFile
from the given Spring Environment
.propertyResolver
- the PropertyResolver
used to obtain the logging
propertiesLogFile
or null
if the environment didn't contain any
suitable propertiesCopyright © 2020 Pivotal Software, Inc.. All rights reserved.