Merged
Conversation
3gf8jv4dv
reviewed
Jun 30, 2025
Contributor
3gf8jv4dv
left a comment
There was a problem hiding this comment.
几个意见:
-
一般不需要太多日志吧。效仿 PCL,只导出最近五个日志文件应该够了。
-
三个按钮并排,对其他语言来说太长了。除简繁外其他语言,在启动器默认窗口大小下,「设置 → 通用」界面均会出现不同程度的 UI 溢出,会出现横向滚动条。如果能将两个类似功能的按钮整合成一个可行否?例如点击此按钮后出现对话框,让用户选择导出当前/最近五个日志文件。
Member
Author
那就将原来的导出当前日志的按钮替换成打包日志 打包日志目录的前五个日志 |
Member
Author
Glavo
requested changes
Jul 28, 2025
HMCL/src/main/java/org/jackhuang/hmcl/ui/main/SettingsPage.java
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements functionality to export recent log files along with the current log when exporting logs, addressing the requirement to include historical context in log exports.
- Refactors log file discovery and management into a dedicated
LogFileclass with proper comparison capabilities - Adds a new
findRecentLogFiles(n)method to retrieve the most recent log files - Updates the log export functionality to create a ZIP archive containing recent logs plus the current log
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| HMCLCore/src/main/java/org/jackhuang/hmcl/util/logging/Logger.java | Adds LogFile class for parsing/comparing log files and findRecentLogFiles() method, refactors existing log cleanup logic |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/main/SettingsPage.java | Updates log export to create ZIP archives with recent logs when available, falls back to single log file export |
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.


Close #4023