A lightweight mod that cleans old, unused log files.
Source: https://github.com/noramibu/LogCleaner/
Issues: https://github.com/noramibu/LogCleaner/issues
The best thing is that this mod keeps files not based on creation date, but the most recent access (of any kind) to the file, so logs that are still being accessed for whatever reason are not removed unwillingly.
It works both client-side only and server-side only.
Intended loader compatibility:
- Forge:
1.7+ - Fabric:
1.14+ - Quilt:
1.18.2+(through Fabric compatibility) - NeoForge:
1.20.2+
Build outputs:
logcleaner-<version>-fabric.jarlogcleaner-<version>-quilt.jarlogcleaner-<version>-forge.jarlogcleaner-<version>-neoforge.jar
By default, it will clean logs that haven't been used in more than 14 days, so there's plenty of time in case you ever need them for debugging, but you can configure it to any amount of days you want.
You can find the mod's configuration file in config/logcleaner.json. There's two options you can change in there:
daysOld: The number of days a log has to have been unused in order for it to be deleted. Defaults to14silent: If set totrue, Log Cleaner will not send a message with the amount of deleted log files to the log. Defaults tofalse
For setup instructions please see the fabric wiki page that relates to the IDE that you are using.
Releases have their json files minified and are recompressed further.