问题
I want to override Spring Boot's default file and console log pattern to include some custom MDC fields.
Is there an easy way to change this using application.properties/yaml? If not this would be a nice feature :-)
Otherwise I probably have to copy Boot's /src/main/resources/org/springframework/boot/logging/logback base.xml and basic.xml files.
I don't think logback supports including those files and overriding property values, or does it?
回答1:
Currently not possible (Boot 1.2.2). See also feature request: https://github.com/spring-projects/spring-boot/issues/1788
来源:https://stackoverflow.com/questions/26629197/overriding-the-file-log-pattern-if-possible-per-env