mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +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
|
|
@ -27,6 +27,7 @@ import (
|
|||
"github.com/88250/lute/render"
|
||||
"github.com/88250/protyle"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
|
@ -112,7 +113,7 @@ func html2BlockDOM(c *gin.Context) {
|
|||
name = name + "-" + ast.NewNodeID() + ext
|
||||
targetPath := filepath.Join(util.DataDir, "assets", name)
|
||||
if err = gulu.File.CopyFile(localPath, targetPath); nil != err {
|
||||
util.LogErrorf("copy asset from [%s] to [%s] failed: %s", localPath, targetPath, err)
|
||||
logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", localPath, targetPath, err)
|
||||
return ast.WalkStop
|
||||
}
|
||||
n.Tokens = gulu.Str.ToBytes("assets/" + name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue