Package org.springframework.boot.logging
Class LogFile
java.lang.Object
org.springframework.boot.logging.LogFile
A reference to a log output file. Log output files are specified using
 
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.- Since:
- 1.2.1
- See Also:
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidapplyTo(Properties properties) Apply log file details toLOG_PATHandLOG_FILEmap entries.voidApply log file details toLOG_PATHandLOG_FILEsystem properties.static LogFileget(org.springframework.core.env.PropertyResolver propertyResolver) Get aLogFilefrom the given SpringEnvironment.toString()
- 
Field Details- 
FILE_NAME_PROPERTYThe name of the Spring property that contains the name of the log file. Names can be an exact location or relative to the current directory.- Since:
- 2.2.0
- See Also:
 
- 
FILE_PATH_PROPERTYThe name of the Spring property that contains the directory where log files are written.- Since:
- 2.2.0
- See Also:
 
 
- 
- 
Method Details- 
applyToSystemPropertiespublic void applyToSystemProperties()Apply log file details toLOG_PATHandLOG_FILEsystem properties.
- 
applyToApply log file details toLOG_PATHandLOG_FILEmap entries.- Parameters:
- properties- the properties to apply to
 
- 
toString
- 
getGet aLogFilefrom the given SpringEnvironment.- Parameters:
- propertyResolver- the- PropertyResolverused to obtain the logging properties
- Returns:
- a LogFileornullif the environment didn't contain any suitable properties
 
 
-