Skip to content

Commit

Permalink
fix main log error
Browse files Browse the repository at this point in the history
Signed-off-by: jikun.zhang <jikun.zhang@megatronix.co>
  • Loading branch information
jikun.zhang committed Jul 21, 2023
1 parent 9421dc9 commit 2fcde8e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,10 @@ func main() {
orm.Debug = true
logtype := beego.AppConfig.String("logtype")
if logtype == "console" {
err := logs.SetLogger(logtype)
if err != nil {
return
}
logs.SetLogger(logtype)
} else if logtype == "file" {
logpath := beego.AppConfig.String("logpath")
err := logs.SetLogger(logtype, `{"filename":"`+logpath+`"}`)
if err != nil {
return
}
logs.SetLogger(logtype, `{"filename":"`+logpath+`"}`)
}
// 输出应用信息
logs.Info("[main] 构建的Go版本: %s", GoVersion)
Expand Down

0 comments on commit 2fcde8e

Please sign in to comment.