How to configure rolling file appender within Spring Boot's application.yml

后端 未结 7 763
[愿得一人]
[愿得一人] 2020-12-01 17:35

Is is possible to configure a daily file appender within the application.yml of a Spring Boot application?

i.e. filenamePattern: myfile.%d{yyyy-MM-dd-HH-mm-ss}.log

7条回答
  •  执笔经年
    2020-12-01 18:16

    From this link :-

    logging:
      file: logs/application-debug.log
      pattern:
        console: "%d %-5level %logger : %msg%n"
        file: "%d %-5level [%thread] %logger : %msg%n"
      level:
        org.springframework.web: ERROR
        com.howtodoinjava: INFO
        org.hibernate: ERROR
    

提交回复
热议问题