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.
|
| 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(PropertyResolver propertyResolver)
Get a
LogFile from the given Spring Environment. |
String |
toString() |
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(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 properties