Skip to content

Commit

Permalink
util: remove logging redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Nov 10, 2021
1 parent 7d97235 commit 3bc3f20
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ func (p *LongPoller) Poll(b *Bot, dest chan Update, stop chan struct{}) {
updates, err := b.getUpdates(p.LastUpdateID+1, p.Limit, p.Timeout, p.AllowedUpdates)
if err != nil {
b.debug(err)
b.debug(ErrCouldNotUpdate)
continue
}

Expand Down
3 changes: 1 addition & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import (
)

func (b *Bot) debug(err error) {
err = errors.WithStack(err)
if b.reporter != nil {
b.reporter(err)
} else {
log.Printf("%+v\n", err)
log.Println(err)
}
}

Expand Down

0 comments on commit 3bc3f20

Please sign in to comment.