System.log and Exception.log size and maintenance?

11,591

You guessed correctly. The log cleaning settings refer to tables of logs in the database. The files in var/log/ are safe to delete, as are most files in var/. If you do not need these files then it is simplest to turn them off from System > Configuration > Developer > Log Settings.

However, if you do think you want some logs just in case then learn how to use logrotate on your server, it can compress files and delete the oldest for you.

Share:
11,591
G. Curry
Author by

G. Curry

Updated on June 05, 2022

Comments

  • G. Curry
    G. Curry almost 2 years

    Our developer left a few weeks ago, so I have been attempting to get myself a little more acquainted with the systems and troubleshoot a few issues around the site.

    I attempted to look at our log files in var/log/ before realizing that they are, erm, several GB each. Despite knowing almost nothing about how big an ideal log file should be, the fact that this file very handily crashed my computer seems like maybe it's too big. Before my computer crashed, I could see that there are records in the file that are over five months old.

    Is it safe to simply delete system.log and exception.log?

    When I search for this, I get a lot of results related to Log Cleaning...

    In Magento there are settings under System to turn on 'Log Cleaning', but I suspect that has nothing to do with these two log files because a) it looks like it is set to clear it daily and b) cron is set up. If I am incorrect about that, please let me know so I can look into why that is not working correctly.