Spring boot logging how to set logging.file.max-size unlimited

Piyush Chaudhari picture Piyush Chaudhari · Sep 18, 2018 · Viewed 15.4k times · Source

I am working with spring boot application where I am using logback for LOGGING purpose and I want to store my log on log file with unlimited size but default size of logging.file.max-size property is 10MB can anyone help me that what value I need to set on logging.file.max-size to achieve unlimited file size for log file?

Answer

kj007 picture kj007 · Sep 18, 2018

Log files rotate when they reach 10 MB and, as with console output, ERROR-level, WARN-level, and INFO-level messages are logged by default. Size limits can be changed using the logging.file.max-size property. Previously rotated files are archived indefinitely unless the logging.file.max-history property has been set.

More customization you can do for logging, please refer Spring Boot Logging