404handler
404handler copied to clipboard
The 404 log should have a sensible max count
The gadget will respond slow when the number of logged 404 in the database increases above a given threshold. The actual number varies, but we should probably truncate at 50 000 rows or so.
The max count should be configurable, and to ensure we do not delete existing data, it should be -1 by default, but the default config set during first-time installation should have a value of 50 000. If the value is -1, it should mean "no maximum". 0 would mean "no logging" (which is the same as turning off the logging switch.
We can truncate during logging, or during start-up. I'd prefer the latter, to avoid adding logic to the logging itself.