Skip to content

Commit

Permalink
add get level
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <[email protected]>
  • Loading branch information
Pavel Okhlopkov committed Oct 23, 2024
1 parent 4885da4 commit 0d2b2d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/unilogger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func NewLogger(opts Options) *Logger {
return l
}

func (l *Logger) GetLevel() Level {
return Level(l.level.Level())
}

func (l *Logger) SetLevel(level Level) {
l.addSourceVar.Set(slog.Level(level) <= slog.LevelDebug)

Expand Down

0 comments on commit 0d2b2d6

Please sign in to comment.