1. export Logger lock

This commit is contained in:
bigpigeon 2017-07-15 14:33:14 +08:00
parent 51dc0fc643
commit 1247c619ff
1 changed files with 9 additions and 0 deletions

View File

@ -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()
}