Fix #4240: 旧版MC日志把每一条都给算成error#6304
Open
Wulian233 wants to merge 3 commits into
Open
Conversation
|
艹,竟然有人想起来这条issue |
Contributor
Author
|
你能给一个所有日志都被算为error的一个版本范围吗 |
Contributor
Author
|
update:上面评论所有的版本都解决了,可以随时审查合并 |
Glavo
reviewed
Jul 5, 2026
| } | ||
|
|
||
| private static boolean containsLevelMarker(String line, Level level) { | ||
| return line.contains("[" + level.getName() + "]") |
Member
There was a problem hiding this comment.
这个方法是需要在后台对每一条日志都要调用的,不要在这里高频拼接字符串造成内存分配。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






update:下面评论所有的版本都解决了
Close #4240
老版本日志的级别都是本地化中文的,所以还需要根据这个判断日志级别,不能不改Log4jLevel.java,否则全部日志都会变成信息级别