From 1247c619ff50faa79c7a219c0fc530c6acb591bd Mon Sep 17 00:00:00 2001 From: bigpigeon Date: Sat, 15 Jul 2017 14:33:14 +0800 Subject: [PATCH] 1. export Logger lock --- logger.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/logger.go b/logger.go index b44966f..7fb6b2b 100644 --- a/logger.go +++ b/logger.go @@ -315,3 +315,12 @@ func (logger *Logger) level() Level { func (logger *Logger) SetLevel(level Level) { atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) } + +// export mu lock and unlock @bigpigeon +func (logger *Logger) Lock() { + logger.mu.Lock() +} + +func (logger *Logger) Unlock() { + logger.mu.Unlock() +}