mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
bbgo: remove slack debug option
This commit is contained in:
parent
638d839975
commit
2732fb413f
|
@ -878,10 +878,16 @@ func (environ *Environment) setupSlack(userConfig *Config, slackToken string, pe
|
|||
|
||||
log.Debugf("adding slack notifier with default channel: %s", conf.DefaultChannel)
|
||||
|
||||
var client = slack.New(slackToken,
|
||||
slack.OptionDebug(true),
|
||||
var slackOpts = []slack.Option{
|
||||
slack.OptionLog(stdlog.New(os.Stdout, "api: ", stdlog.Lshortfile|stdlog.LstdFlags)),
|
||||
slack.OptionAppLevelToken(slackAppToken))
|
||||
slack.OptionAppLevelToken(slackAppToken),
|
||||
}
|
||||
|
||||
if b, ok := util.GetEnvVarBool("DEBUG_SLACK"); ok {
|
||||
slackOpts = append(slackOpts, slack.OptionDebug(b))
|
||||
}
|
||||
|
||||
var client = slack.New(slackToken, slackOpts...)
|
||||
|
||||
var notifier = slacknotifier.New(client, conf.DefaultChannel)
|
||||
environ.AddNotifier(notifier)
|
||||
|
|
|
@ -34,7 +34,6 @@ type Notifier struct {
|
|||
type NotifyOption func(notifier *Notifier)
|
||||
|
||||
func New(client *slack.Client, channel string, options ...NotifyOption) *Notifier {
|
||||
// var client = slack.New(token, slack.OptionDebug(true))
|
||||
notifier := &Notifier{
|
||||
channel: channel,
|
||||
client: client,
|
||||
|
|
Loading…
Reference in New Issue
Block a user