mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 增加 kernel.log https://github.com/siyuan-note/siyuan/issues/7789
This commit is contained in:
parent
f534675464
commit
a85c61d3c1
7 changed files with 57 additions and 39 deletions
|
|
@ -174,14 +174,23 @@ func ExportSystemLog() (zipPath string) {
|
|||
logging.LogErrorf("copy app log from [%s] to [%s] failed: %s", err, appLog, to)
|
||||
}
|
||||
}
|
||||
kernelLog := filepath.Join(util.TempDir, "siyuan.log")
|
||||
|
||||
kernelLog := filepath.Join(util.HomeDir, ".config", "siyuan", "kernel.log")
|
||||
if gulu.File.IsExist(kernelLog) {
|
||||
to := filepath.Join(exportFolder, "siyuan.log")
|
||||
to := filepath.Join(exportFolder, "kernel.log")
|
||||
if err := gulu.File.CopyFile(kernelLog, to); nil != err {
|
||||
logging.LogErrorf("copy kernel log from [%s] to [%s] failed: %s", err, kernelLog, to)
|
||||
}
|
||||
}
|
||||
|
||||
siyuanLog := filepath.Join(util.TempDir, "siyuan.log")
|
||||
if gulu.File.IsExist(siyuanLog) {
|
||||
to := filepath.Join(exportFolder, "siyuan.log")
|
||||
if err := gulu.File.CopyFile(siyuanLog, to); nil != err {
|
||||
logging.LogErrorf("copy kernel log from [%s] to [%s] failed: %s", err, siyuanLog, to)
|
||||
}
|
||||
}
|
||||
|
||||
zipPath = exportFolder + ".zip"
|
||||
zip, err := gulu.Zip.Create(zipPath)
|
||||
if nil != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue