Skip to content

Commit

Permalink
Merge pull request #270 from YongHaoWu/master
Browse files Browse the repository at this point in the history
consumer logger: Add set level.
  • Loading branch information
jehiah committed Dec 24, 2019
2 parents b1a08a5 + 48e321c commit 5dd0672
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ func (r *Consumer) SetLogger(l logger, lvl LogLevel) {
r.logLvl = lvl
}

func (r *Consumer) SetLoggerLevel(lvl LogLevel) {
r.logGuard.Lock()
defer r.logGuard.Unlock()

r.logLvl = lvl
}

func (r *Consumer) getLogger() (logger, LogLevel) {
r.logGuard.RLock()
defer r.logGuard.RUnlock()
Expand Down

0 comments on commit 5dd0672

Please sign in to comment.