✏️ 调整 log 格式

This commit is contained in:
fumiama
2021-09-27 21:27:30 +08:00
parent 52a8a9de6f
commit 3623a88b16
2 changed files with 6 additions and 13 deletions

14
main.go
View File

@@ -43,7 +43,7 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin_setutime" // 来份涩图
// 以下为内置依赖,勿动
log "github.com/sirupsen/logrus"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/driver"
@@ -58,19 +58,17 @@ var (
"* Project: https://github.com/FloatTech/ZeroBot-Plugin",
}
banner = strings.Join(contents, "\n")
// 是否禁用gui
disableGui bool
)
func init() {
// 解析命令行参数,输入`-g`即可禁用gui
flag.BoolVar(&disableGui, "g", false, "Disable the gui")
var en bool
// 解析命令行参数,输入 `-g` 即可启用 gui
flag.BoolVar(&en, "g", false, "Enable the gui")
flag.Parse()
if !disableGui {
if en {
control.InitGui()
}
log.SetLevel(log.DebugLevel)
// log.SetLevel(log.DebugLevel)
}
func main() {