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
I have configuration such as the following in my application.yml file.
logging:
file: /mypath/myfile.log
level:
mypackage: INFO
Thanks
From this link :-
To override the default file appender and change it to daily rollover, you could use a logback-spring.xml looking like this:
The default file appender is size based (10MB).
In your
logback.xml
just configure aTimeBasedRollingPolicy
as described hereI.e. something like: