mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-12-21 07:00:22 +08:00
修复日志导出 (#2400)
* 优化日志导出
以防万一的操作,防止一些必要的 log 没被打包
* Update LogExporter.java
* 更新 LogExporter.java
* add
* Revert "add"
This reverts commit 287f9300d7
.
* add
* 奇怪我什么时候改过这里了?
This commit is contained in:
parent
c1ffd26c80
commit
05086fa76d
@ -831,6 +831,10 @@ public final class LauncherHelper {
|
||||
|
||||
@Override
|
||||
public void onExit(int exitCode, ExitType exitType) {
|
||||
if (showLogs) {
|
||||
Platform.runLater(() -> logWindow.logLine(String.format("[HMCL ProcessListener] Minecraft exit with code %d.", exitCode), Log4jLevel.INFO));
|
||||
}
|
||||
|
||||
launchingLatch.countDown();
|
||||
|
||||
if (exitType == ExitType.INTERRUPTED)
|
||||
|
@ -92,7 +92,7 @@ public final class LogExporter {
|
||||
|
||||
for (Path file : stream) {
|
||||
if (Files.isRegularFile(file)) {
|
||||
FileTime time = Files.readAttributes(file, BasicFileAttributes.class).creationTime();
|
||||
FileTime time = Files.readAttributes(file, BasicFileAttributes.class).lastModifiedTime();
|
||||
if (time.toMillis() >= processStartTime) {
|
||||
String crashLog = Logging.filterForbiddenToken(FileUtils.readText(file));
|
||||
zipper.putTextFile(crashLog, file.getFileName().toString());
|
||||
|
Loading…
Reference in New Issue
Block a user