类 LogFile
- java.lang.Object
- org.springframework.boot.logging.LogFile
public class LogFile extends Object
A reference to a log output file. Log output files are specified usinglogging.file
orlogging.path
Environment
properties. If thelogging.file
property is not specified"spring.log"
will be written in thelogging.path
directory.- 从以下版本开始:
- 1.2.1
- 另请参阅:
get(PropertyResolver)
字段概要
字段 修饰符和类型 字段 说明 static String
FILE_PROPERTY
The name of the Spring property that contains the name of the log file.static String
PATH_PROPERTY
The name of the Spring property that contains the directory where log files are written.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
applyTo(Properties properties)
Apply log file details toLOG_PATH
andLOG_FILE
map entries.void
applyToSystemProperties()
Apply log file details toLOG_PATH
andLOG_FILE
system properties.static LogFile
get(org.springframework.core.env.PropertyResolver propertyResolver)
Get aLogFile
from the given SpringEnvironment
.String
toString()
字段详细资料
FILE_PROPERTY
public static final String FILE_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.- 另请参阅:
- 常量字段值
PATH_PROPERTY
public static final String PATH_PROPERTY
The name of the Spring property that contains the directory where log files are written.- 另请参阅:
- 常量字段值
方法详细资料
applyToSystemProperties
public void applyToSystemProperties()
Apply log file details toLOG_PATH
andLOG_FILE
system properties.
applyTo
public void applyTo(Properties properties)
Apply log file details toLOG_PATH
andLOG_FILE
map entries.- 参数:
properties
- the properties to apply to