mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +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
|
|
@ -23,6 +23,7 @@ import (
|
|||
|
||||
"github.com/88250/lute/parse"
|
||||
"github.com/emirpasic/gods/sets/hashset"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
|
@ -35,14 +36,14 @@ func init() {
|
|||
|
||||
func InsertBlocksSpans(tx *sql.Tx, tree *parse.Tree) (err error) {
|
||||
if err = insertBlocksSpans(tx, tree); nil != err {
|
||||
util.LogErrorf("insert tree [%s] into database failed: %s", tree.Box+tree.Path, err)
|
||||
logging.LogErrorf("insert tree [%s] into database failed: %s", tree.Box+tree.Path, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func InsertRefs(tx *sql.Tx, tree *parse.Tree) {
|
||||
if err := insertRef(tx, tree); nil != err {
|
||||
util.LogErrorf("insert refs tree [%s] into database failed: %s", tree.Box+tree.Path, err)
|
||||
logging.LogErrorf("insert refs tree [%s] into database failed: %s", tree.Box+tree.Path, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -465,7 +466,7 @@ func upsertTree(tx *sql.Tx, tree *parse.Tree) (err error) {
|
|||
}
|
||||
subTree := parse.Parse("", []byte(block.Markdown), luteEngine.ParseOptions)
|
||||
if nil == subTree {
|
||||
util.LogErrorf("parse temp block [%s] failed: %s", block.ID, err)
|
||||
logging.LogErrorf("parse temp block [%s] failed: %s", block.ID, err)
|
||||
continue
|
||||
}
|
||||
if 0 < len(treenode.GetLegacyDynamicBlockRefDefIDs(subTree.Root)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue