Codeistry

Managing MODx logs

There are two tables in the MODx database which accumulate logging information about what's happening on your site. There's the *_event_log table which collects logs of errors and other problems, and there's the *_manager_log table which keeps track of who's been doing what in the manager.

To find out how many rows and bytes each table is taking up, in the Manager, click the Reports tab, then System Info, scroll to the bottom and it'll tell you.

Image shows the Database tables report, displaying the table name, records and data size of the MODx tables. These two tables need keeping an eye on. If you let them fill up with thousands of records, over time this can affect your site's performance. The manager log tracks everything done in the manager, so you can go back and see who's been editing what; this will grow over time, if you're using the manager regularly. The event log is for errors and shouldn't grow at all, unless there's a problem.

In order to clear the manager_log table, still on the Reports tab in the Manager, click 'Manager Actions' then just click 'Search' (the query is irrelevant for this). Now just under the 'Query Results' header, you'll see an 'empty' link - clicking this will clear the manager_logs table.

Also on the Reports tab, clicking 'System Events' will show you the contents of the 'event_log' table and has a 'Clear log' button. If this has lots of rows in, then it indicates that there's a problem that needs sorting out before you clear it.