mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 01:36:09 +01:00
♻️ 日志组件单独抽取项目 https://github.com/siyuan-note/siyuan/issues/5439
This commit is contained in:
parent
c8ea858976
commit
505b973c2d
70 changed files with 671 additions and 942 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
|
@ -92,13 +93,13 @@ func RemoveBox(boxID string) (err error) {
|
|||
var historyDir string
|
||||
historyDir, err = util.GetHistoryDir("delete")
|
||||
if nil != err {
|
||||
util.LogErrorf("get history dir failed: %s", err)
|
||||
logging.LogErrorf("get history dir failed: %s", err)
|
||||
return
|
||||
}
|
||||
p := strings.TrimPrefix(localPath, util.DataDir)
|
||||
historyPath := filepath.Join(historyDir, p)
|
||||
if err = gulu.File.Copy(localPath, historyPath); nil != err {
|
||||
util.LogErrorf("gen sync history failed: %s", err)
|
||||
logging.LogErrorf("gen sync history failed: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue