Skip to content

Commit

Permalink
add controllers of FlashDuty to PrometheusAlert
Browse files Browse the repository at this point in the history
  • Loading branch information
cyancow committed Jul 17, 2023
1 parent 79804fd commit 374a61d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions controllers/FlashDuty.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package controllers
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,16 @@ func main() {
orm.Debug = true
logtype := beego.AppConfig.String("logtype")
if logtype == "console" {
logs.SetLogger(logtype)
err := logs.SetLogger(logtype)
if err != nil {
return

This comment has been minimized.

Copy link
@feiyu563

feiyu563 Jul 21, 2023

Owner

这里会导致服务报错,无法启动

}
} else if logtype == "file" {
logpath := beego.AppConfig.String("logpath")
logs.SetLogger(logtype, `{"filename":"`+logpath+`"}`)
err := logs.SetLogger(logtype, `{"filename":"`+logpath+`"}`)
if err != nil {
return
}
}
// 输出应用信息
logs.Info("[main] 构建的Go版本: %s", GoVersion)
Expand Down

0 comments on commit 374a61d

Please sign in to comment.