From 07f3889a705b3283c3e1d4999c827fc50f731b15 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sun, 13 Nov 2022 16:11:54 +0100 Subject: [PATCH] mlog: MaxLevel method --- mlog/mlog.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mlog/mlog.go b/mlog/mlog.go index 1be9a21..8928ded 100644 --- a/mlog/mlog.go +++ b/mlog/mlog.go @@ -290,6 +290,12 @@ func (l *Logger) WithMaxLevel(level int) *Logger { return l } +// MaxLevel returns the Logger's maximum level which it will log (see MaxLevel +// in LoggerOpts, and the WithMaxLevel method). +func (l *Logger) MaxLevel() int { + return l.opts.MaxLevel +} + // Log can be used to manually log a message of some custom defined Level. // // If the Level is a fatal (Int() < 0) then calling this will never return,