File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change 3232
3333所有支持的日志系统在解析配置文件时都能获取系统属性的值,具体可以参考` spring-boot.jar ` 中的默认配置。
3434
35- ** 注** 如果想在日志属性中使用占位符,你需要使用[ Spring Boot的语法] ) (http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-external-config-placeholders-in-properties),而不是底层框架的语法。尤其是使用Logback时,你需要使用`:`作为属性名和默认值的分隔符,而不是`:-`。
35+ ** 注** 如果想在日志属性中使用占位符,你需要使用[ Spring Boot的语法] ( http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/htmlsingle/#boot-features-external-config-placeholders-in-properties ) ,而不是底层框架的语法。尤其是使用Logback时,你需要使用` : ` 作为属性名和默认值的分隔符,而不是` :- ` 。
3636
3737** 注** 通过覆盖` LOG_LEVEL_PATTERN ` (Logback对应` logging.pattern.level ` ),你可以向日志中添加MDC和其他ad-hoc的内容。例如,将该值设置为` logging.pattern.level=user:%X{user} %5p ` ,则默认日志格式将包含一个"user"的MDC实体,如果存在的话,比如:
3838``` properties
You can’t perform that action at this time.
0 commit comments