This is fork of Log Cleaner by altrisi, which works fine up-to 1.21.11 for Fabric, but doesn't support Forge & NeoForge. This fork simply adds NeoForge & Forge support for older versions, and updated to latest versions of Minecraft.
A lightweight mod that cleans old, unused log files.
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, and works in every Minecraft version.
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:

A lightweight mod to clean old, unused log files. Forked for adding Forge & 26.1 support