🎨 Add mobile.log file to diagnose mobile issues https://github.com/siyuan-note/siyuan/issues/10270

This commit is contained in:
Daniel 2024-01-28 14:28:46 +08:00
parent c76b1f3252
commit 8c5f8d2bc4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 15 additions and 4 deletions

View file

@ -328,6 +328,14 @@ func ExportSystemLog() (zipPath string) {
}
}
mobileLog := filepath.Join(util.TempDir, "mobile.log")
if gulu.File.IsExist(mobileLog) {
to := filepath.Join(exportFolder, "mobile.log")
if err := filelock.Copy(mobileLog, to); nil != err {
logging.LogErrorf("copy mobile log from [%s] to [%s] failed: %s", err, mobileLog, to)
}
}
zipPath = exportFolder + ".zip"
zip, err := gulu.Zip.Create(zipPath)
if nil != err {