refactor: change log texts
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Mmx233/BitSrunLoginGo/global"
|
|
||||||
"github.com/Mmx233/BitSrunLoginGo/util"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/Mmx233/BitSrunLoginGo/global"
|
||||||
|
"github.com/Mmx233/BitSrunLoginGo/util"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Guardian 守护模式逻辑
|
// Guardian 守护模式逻辑
|
||||||
@@ -54,12 +55,12 @@ func Guardian() {
|
|||||||
|
|
||||||
// EnterGuardian 守护模式入口,控制是否进入daemon
|
// EnterGuardian 守护模式入口,控制是否进入daemon
|
||||||
func EnterGuardian() {
|
func EnterGuardian() {
|
||||||
log.Infoln("[Guardian mode]")
|
log.Infoln("[以守护模式启动]")
|
||||||
if global.Config.Settings.Daemon.Enable || global.Flags.Daemon {
|
if global.Config.Settings.Daemon.Enable || global.Flags.Daemon {
|
||||||
if err := exec.Command(os.Args[0], append(os.Args[1:], "--running-daemon")...).Start(); err != nil {
|
if err := exec.Command(os.Args[0], append(os.Args[1:], "--running-daemon")...).Start(); err != nil {
|
||||||
log.Fatalln("启动守护失败: ", err)
|
log.Fatalln("启动守护失败: ", err)
|
||||||
}
|
}
|
||||||
log.Infoln("[Daemon mode entered]")
|
log.Infoln("[进入后台进程模式")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Guardian()
|
Guardian()
|
||||||
|
|||||||
Reference in New Issue
Block a user