mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40: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
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/88250/gulu"
|
||||
"github.com/88250/melody"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/logging"
|
||||
)
|
||||
|
||||
func GetRemoteAddr(session *melody.Session) string {
|
||||
|
|
@ -70,14 +71,14 @@ func tryToListenPort() bool {
|
|||
time.Sleep(time.Second * 3)
|
||||
listener, err = net.Listen("tcp", "127.0.0.1:"+ServerPort)
|
||||
if nil != err {
|
||||
LogErrorf("try to listen port [%s] failed: %s", ServerPort, err)
|
||||
logging.LogErrorf("try to listen port [%s] failed: %s", ServerPort, err)
|
||||
return false
|
||||
}
|
||||
}
|
||||
if err = listener.Close(); nil != err {
|
||||
time.Sleep(time.Second * 1)
|
||||
if err = listener.Close(); nil != err {
|
||||
LogErrorf("close listen port [%s] failed: %s", ServerPort, err)
|
||||
logging.LogErrorf("close listen port [%s] failed: %s", ServerPort, err)
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue