refactor: change log texts

This commit is contained in:
Revincx
2022-10-15 16:30:12 +08:00
parent ecf354fca9
commit 30b231c229

View File

@@ -1,12 +1,13 @@
package controllers
import (
"github.com/Mmx233/BitSrunLoginGo/global"
"github.com/Mmx233/BitSrunLoginGo/util"
log "github.com/sirupsen/logrus"
"os"
"os/exec"
"time"
"github.com/Mmx233/BitSrunLoginGo/global"
"github.com/Mmx233/BitSrunLoginGo/util"
log "github.com/sirupsen/logrus"
)
// Guardian 守护模式逻辑
@@ -54,12 +55,12 @@ func Guardian() {
// EnterGuardian 守护模式入口控制是否进入daemon
func EnterGuardian() {
log.Infoln("[Guardian mode]")
log.Infoln("[以守护模式启动]")
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 {
log.Fatalln("启动守护失败: ", err)
}
log.Infoln("[Daemon mode entered]")
log.Infoln("[进入后台进程模式")
return
}
Guardian()