mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
cmd: add log message for rollbar token
This commit is contained in:
parent
c8098b414b
commit
d83feec9ec
|
@ -20,6 +20,7 @@ import (
|
|||
"github.com/x-cray/logrus-prefixed-formatter"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
@ -50,9 +51,11 @@ var RootCmd = &cobra.Command{
|
|||
env = "development"
|
||||
}
|
||||
|
||||
if viper.GetString("rollbar-token") != "" {
|
||||
if token := viper.GetString("rollbar-token"); token != "" {
|
||||
log.Infof("found rollbar token %q, setting up rollbar hook...", util.MaskKey(token))
|
||||
|
||||
log.AddHook(rollrus.NewHook(
|
||||
viper.GetString("rollbar-token"),
|
||||
token,
|
||||
env,
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user