XF 2.1 log pruning confusion and inconsistency

dethfire

Well-known member
There are several logs, but only 2 are you able to control the pruning or if there is any at all. The difference in options here is totally bizarre and arbitrary.

First where/what is the "Change log" located and how is it different than history tracking.

Here is how I've organized the options for the logs I use. The several others I don't know because I don't use them and are always empty. Why not provide consistent options for pruning all logs? For example I have 5 years worth of spam clean entries (over 10k) where 99% are worthless entries that should be set free. I have about 80k useless user change entries that only go back to May for some reason. Can I clear all these from phpmyadmin?


Can be manually pruned
Server error logs

Pruning option available
Mod log

No pruning options
User registration
User change
Spam cleaner

Possible hard coded pruning time frame?
Spam trigger
Admin log
 
Some logs have different uses so different approaches are appropriate.

For example, the server error log is not something that should be pruned automatically as entries there should ideally be analyzed as they may indicate bugs or other sorts of errors. Ideally, that log shouldn't have entries inserted often and once analyzed/resolved, they can be removed. (Think inbox zero.) An old record may still be relevant there.

When you say "user registration", I assume you mean the "rejected user log". That is roughly equivalent to the banned user system. Any rejected user will have this data, similar to the banned user data. This can only be removed by unrejecting a user (or deleting the account).

The user change log is covered by the change log option you identified. The change log is designed for generic metadata changes (such as particular profile fields) and can apply to multiple content types (though currently only users out of the box). The edit history tracking relates specifically to tracking message content changes (and thus can grow rather quickly); this is the "history" link on posts.

The admin log pruning is controllable, but this has to be done via config.php. This is very intentional for security reasons, otherwise an attacker gaining access to the control panel could wipe the log out by changing the automatic pruning options.

Generally speaking, most other logs are pruned via a hard coded value as they represent data that is appropriate at a point in time. For example, the spam trigger log is mostly to help identify whether your rules are triggering false positives and thus the most recent entries are the most significant.

The spam cleaner log is sort of an exception there. That can probably be cleared out if you want (though I haven't double checked that in the code). Note that the spam cleaner is generally an undoable action (for soft deleted content) and this is tracked in this log. Removing the records would prevent that.
 
Back
Top Bottom