Skip to content

Commit

Permalink
consumer logger: Add set level.
Browse files Browse the repository at this point in the history
  • Loading branch information
atlas-comstock committed Oct 9, 2019
1 parent 0455293 commit 48e321c
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 48e321c

Please sign in to comment.