Shush
本模组允许使用正则表达式匹配来完全移除控制台日志。
日志通常很重要
如果你遇到了日志刷屏的情况,请先与模组作者确认!如果需要向任何模组报告问题,请务必先移除本模组!模组作者在排查问题时不希望看到被篡改的日志。
那为什么会有这个模组?
有时候,你可能会遇到一些刷屏控制台的日志,而你清楚这并非问题所在。也许是开发者忘记删除某处的打印语句,或者该错误与你当前的情况无关。有时,大量的日志甚至可能拖慢你使用的启动器。通常情况下,你只能忍受它。但本模组提供了一种替代方案。
它提供什么功能
在模组配置中,你可以定义一个正则表达式模式列表。如果任何日志匹配了某个模式,它将不会被输出。这适用于 Log4j 消息(例如 [hh:mm:ss] [线程/级别] [类路径]: 消息)以及 任何非传统的 System.out 消息(虽然很难追溯至特定模组,但幸运的是这种情况要少见得多)。
什么是正则表达式(Regex)
Regex 是“Regular Expression”(正则表达式)的缩写。正则表达式是一组可用于筛选文本数据的字符序列。我强烈推荐尝试 RegExr.com 来练习和使用正则表达式。
Shush
This mod allows the complete removal of console logs using Regex matches.
Logs are usually important
If you are experiencing log spam, make sure to check with the mod author first! If you need to report an issue to any mod, please remove this mod first! Mod authors don't want tampered with logs when trying to find an issue.
Then why does this exist
Sometimes, you might experience a log spamming your console that you know isn't a problem. Perhaps a dev forgot to remove a print statement somewhere, or the error simply isn't relevant to your situation. Sometimes it can even slow down your launcher of choice with the amount of logs. Normally, you just have to put up with it. But this mod provides an alternative.
What does it offer
In the mod config, you can define a list of regex patterns. If any log matches a pattern, it will be prevented from outputting. This works for both Log4j messages (e.g. [hh:mm:ss] [thread/LEVEL] [classpath]: message) and any un-conventional System.out messages (much harder to trace back to a particular mod, but luckily much less common).
What on earth is Regex
Regex is short for "Regular Expression". Regular expressions are a sequence of characters that can be used to sort through text data. I highly recommend RegExr.com for experimenting with Regex
评论 0
登录后参与评分
还没有评论,来抢沙发吧