类 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.- 从以下版本开始:
- 1.2.1
- 作者:
- Phillip Webb, Christian Carriere-Tisseur
- 另请参阅:
-
字段概要
字段 -
方法概要
修饰符和类型方法说明voidapplyTo(Properties properties) Apply log file details toLOG_PATHandLOG_FILEmap entries.voidApply log file details toLOG_PATHandLOG_FILEsystem properties.static LogFileget(PropertyResolver propertyResolver) Get aLogFilefrom the given SpringEnvironment.toString()
-
字段详细资料
-
FILE_NAME_PROPERTY
The 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.- 从以下版本开始:
- 2.2.0
- 另请参阅:
-
FILE_PATH_PROPERTY
The name of the Spring property that contains the directory where log files are written.- 从以下版本开始:
- 2.2.0
- 另请参阅:
-
-
方法详细资料
-
applyToSystemProperties
public void applyToSystemProperties()Apply log file details toLOG_PATHandLOG_FILEsystem properties. -
applyTo
Apply log file details toLOG_PATHandLOG_FILEmap entries.- 参数:
properties- the properties to apply to
-
toString
-
get
Get aLogFilefrom the given SpringEnvironment.- 参数:
propertyResolver- thePropertyResolverused to obtain the logging properties- 返回:
- a
LogFileornullif the environment didn't contain any suitable properties
-