From 156c4044ecb24c2b1f763b94e235f97f5ab5317f Mon Sep 17 00:00:00 2001 From: nolouch Date: Mon, 11 Feb 2019 10:35:21 +0800 Subject: [PATCH] address comments --- global.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/global.go b/global.go index f109324..3debaab 100644 --- a/global.go +++ b/global.go @@ -59,3 +59,10 @@ func SetLevel(l zapcore.Level) { defer _globalMu.Unlock() _globalR.Level.SetLevel(l) } + +// GetLevel gets the logging level. +func GetLevel() zapcore.Level { + _globalMu.RLock() + defer _globalMu.RUnlock() + return _globalR.Level.Level() +}