App.msg/warn/err events are not written to the log file and levels don't match
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java
- 领域
- backend, documentation
调研方向
Start by locating the App.msg(), App.warn() and App.err() definitions and searching their roughly 124 call sites for matching logger calls; the issue does not name source or test files. Read jdm-core/docs/benchmarks.md §4.1 for the warning and error semantics, then check whether existing logging tests cover event levels and duplicate lines. Done means event methods log at the specified levels, duplicate calls are removed while stack traces are retained, severity choices are reviewed, and the documentation is updated.
由索引模型根据 Issue 内容生成。
描述
Problem
App.msg(), App.warn() and App.err() only write to the Events tab (GUI) or the console (CLI). They never write to the log file (jdiskmark-0-0.log). Callers that want an event in the log must also call Logger themselves and pick a level by hand, so:
- Events are missing from the log. Examples found while verifying #253 on Windows: the Keep Direct I/O choice, "Benchmark started/completed" and "Unable to delete test data" appeared in the Events tab but not in the log, which made the run hard to diagnose afterwards. Those specific lines were patched in #253, but any other
App.*call without a matching logger call has the same gap. - Levels don't match. Some code pairs
App.err()(red) withLevel.WARNING, e.g.DriveChecker.checkDiskSpace()and the delete failure inBatchWorker. - Lines are duplicated by hand. Many call sites log a message and then pass the same text to
App.*.
There are about 124 msg/warn/err call sites: roughly 47 App.err() and 3 App.warn(), the rest msg.
Proposed solution
-
Have the
Appevent methods log at a fixed matching level:App method Events tab Log level App.msg()normal INFOApp.warn()amber WARNINGApp.err()red SEVERE -
Remove the logger calls that sit next to an
App.*call with the same text, so lines aren't logged twice. Keep a logger call only when it adds a stack trace (e.g.LOG.log(Level.SEVERE, msg, e)), or offer anApp.err(String, Throwable)overload for that. -
Review
App.err()vsApp.warn()choices so the colour reflects the severity. benchmarks.md §4.1 describeswarnas recoverable anderras failures. -
Use a single logger (e.g.
jdiskmark.Appor anEventslogger) so event lines are easy to filter in the log.
Notes
- Verbose or high-frequency
msg()output (e.g. per-run settings dumps) may needFINEinstead ofINFOto keep the log readable. - Update
jdm-core/docs/benchmarks.md§4.1 (theApp.warn()/App.err()paragraph) to describe the logging.
- 主要语言
- Java
- 星标
- 6
- 派生
- 6
- 平均合并
- 10 小时 11 分钟
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JDiskMark/jdm-java 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
enhancement linux
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
documentation linux
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement linux
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
bug linux
难度 3/5 1-2 天 新手友好度 52/100
维护者通常 1 天内回复
查看 JDiskMark/jdm-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
bloxbean/yaci-store#1445 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
-
Spare Permission未关闭
难度 2/5 1-3 小时 新手友好度 63/100
Etar-Group/Etar-Calendar#2234 ·
维护者通常 1 天内回复
-
[BUG] MCP resources-as-tools drops invocation context when listing templates可能已有人在做 @CryoThrust 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
langchain4j/langchain4j#7320 ·
维护者通常 1 天内回复