From 20d755ea5e94d92e979f3fbb699844465a1a0530 Mon Sep 17 00:00:00 2001 From: Steve Jarvis Date: Fri, 7 Jul 2017 16:29:37 -0400 Subject: [PATCH] Export logger's set level function to address #503. --- exported.go | 2 +- logger.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exported.go b/exported.go index 1aeaa90..013183e 100644 --- a/exported.go +++ b/exported.go @@ -31,7 +31,7 @@ func SetFormatter(formatter Formatter) { func SetLevel(level Level) { std.mu.Lock() defer std.mu.Unlock() - std.setLevel(level) + std.SetLevel(level) } // GetLevel returns the standard logger level. diff --git a/logger.go b/logger.go index 370fff5..b44966f 100644 --- a/logger.go +++ b/logger.go @@ -312,6 +312,6 @@ func (logger *Logger) level() Level { return Level(atomic.LoadUint32((*uint32)(&logger.Level))) } -func (logger *Logger) setLevel(level Level) { +func (logger *Logger) SetLevel(level Level) { atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) }