XF 1.2 Purge Admin and Mod Log

I don't think it's possible via ACP. I don't know how trivial creating such an addon would be.

You could use phpmyadmin or adminer or other web-based mysql management tool. Or if you have direct shell access, you can use mysql commands there.

The tables are:
xf_admin_log
xf_moderator_log

Using phpMyAdmin, click the forum database on the left, then a list of tables comes up, click the tab "SQL", and enter the following commands:
truncate table xf_admin_log;
Execute the command
truncate table xf_moderator_log;
Execute the command

If you have ssh access to your server, log in and you could do the following:
mysql -u username -p databasename
truncate table xf_admin_log;
truncate table xf_moderator_log;

Truncate empties the contents of the table but doesn't remove the table as opposed to drop. The end result should be that the admin and moderator logs are emptied. No guarantees though, and naturally always have recent backups available.
 
  • Like
Reactions: DRE
The mod log length can be set to 1 day in Logging Options.

Other than that, the only way to empty them is as markku has explained.

I periodically truncate mine just to clear them out.
Doing so does not affect data integrity.
 
  • Like
Reactions: DRE
Top Bottom