killme2008 / killme2008/Metamorphosis

使用log4j-over-slf4j不能兼容的问题

Open
#95 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.3k
Forks
672
PR merge metrics
No merged PRs in 30d

Description

MonitorLog.java 的 static 块中显式用到了 log4j的不常用类:FileAppender、DailyRollingFileAppender

而 log4j.jar 作者后续的 log4j-over-self4j.jar,没有这两个类(NoClassDefFoundError),
只有 log4j 标准 API 用法的同名类 和 Appender/RollingFileAppender 等有限类。

感觉MetaStatLog实际没多大用处,这个是否可以直接去掉?
或者改为简单地写文件,不依赖具体的log的实现,或者改用slf4j?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the static block in MonitorLog.java and inspect how MetaStatLog uses FileAppender and DailyRollingFileAppender. Confirm the failure with log4j-over-slf4j, then determine and document a chosen compatibility approach; done means startup no longer raises NoClassDefFoundError with that dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.