How to handle disk full errors while logging in logback?

前端 未结 3 1773
眼角桃花
眼角桃花 2021-02-08 12:36

I am using slf4j+logback for logging in our application. Earlier we were using jcl+log4j and moved recently.

Due to the high amount of logging in our application, there

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 13:18

    2 real options:

    • add a cron task on linux (or scheduled one on windows) to clean up your mess (incl. gzip some, if need be).
    • buy a larger hard disk and manually perform the maintenance

    • +-reduce logging

    Disk full is like OOM, you can't know what fails 1st when catch it. Dealing w/ out of memory (or disk) is by preventing it. There could be a lot of cases when extra disk space could be needed and the task failed.

提交回复
热议问题