This commit fixes data race using atomics. We switch type of level from uint8 to uint32 but due memory alignment on most platforms it will not result in any additional memory.

This commit is contained in:
DmitriyMV
2017-03-23 19:13:19 +03:00
parent 10f801ebc3
commit 3bcb09397d
4 changed files with 51 additions and 42 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import (
type Fields map[string]interface{}
// Level type
type Level uint8
type Level uint32
// Convert the Level to a string. E.g. PanicLevel becomes "panic".
func (level Level) String() string {