这是 Log Cleaner by altrisi 的一个分支,该原版模组在 Fabric 上运行良好(最高支持到 1.21.11),但不支持 Forge 和 NeoForge。本分支仅为旧版本添加了 NeoForge 和 Forge 的支持,并更新到了 Minecraft 的最新版本。
简介
一款轻量级模组,用于清理旧的、未使用的日志文件。
此模组最出色的地方在于,它并非基于文件的创建日期来保留文件,而是基于对文件的最近一次访问记录(无论何种类型),因此即使出于某些原因仍在被访问的日志也不会被误删。
它既可以在仅客户端环境下运行,也可以在仅服务器端环境下运行,并且适用于所有 Minecraft 版本。
默认情况下,它会清理超过 14 天未被使用的日志,这样如果你需要调试,还有充足的时间可以找回;但你也可以将其配置为你想要的任意天数。
配置
你可以在 config/logcleaner.json 中找到模组的配置文件。其中有两个选项可供修改:
- daysOld: 日志必须未被使用的天数,达到该值后将被删除。默认为 14
- silent: 如果设置为 true,Log Cleaner 将不会在日志中发送已删除日志文件数量的消息。默认为 false
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.
Summary
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.
Configuration
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 to 14
- silent: If set to true, Log Cleaner will not send a message with the amount of deleted log files to the log. Defaults to false
评论 0
登录后参与评分
还没有评论,来抢沙发吧