Hello. please help with the file name. The time format does not work well.
I expected to see 1 file named "2020-02-07 10_38_40 pid-17996.log"
Comment From: bclozel
I don't think you're allowed to use such patterns in the main log file itself. Such patterns are only useful for rolling file names; with Spring Boot 2.2+, you can do something like this:
logging:
file:
name: logs/spring.log
pattern:
rolling-file-name: "${LOG_FILE}.%d{yyyy-MM-dd}.${PID}.%i.gz"
and have files like this in your logs folder:
spring.log
spring.log.2020-02-07.3457.0.gz
spring.log.2020-02-07.3457.1.gz
In any case, this has more to do with the rolling file policy with the logging system you've chosen. For more questions, please use StackOverflow.
Thanks!