Skip to content

Commit

Permalink
perf: add store to log file
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Dec 24, 2024
1 parent 763dad6 commit 6c0bcec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/kotlin/li/songe/gkd/util/FolderExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ fun buildLogFile(): File {
.resolve("appList.json")
appListFile.writeText(json.encodeToString(appInfoCacheFlow.value.values.toList()))
files.add(appListFile)
val storeFile = logZipDir
.resolve("store.json")
storeFile.writeText(json.encodeToString(storeFlow.value))
files.add(storeFile)
val logZipFile = logZipDir.resolve("log-${System.currentTimeMillis()}.zip")
ZipUtils.zipFiles(files, logZipFile)
appListFile.delete()
storeFile.delete()
return logZipFile
}

0 comments on commit 6c0bcec

Please sign in to comment.