Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use sync.atomic to synchronize logging logLevel #716
sync.atomic performs significantly better than RWMutex for single int synchronization. (see https://go-review.googlesource.com/#/c/3430/).
Moving loglevel checks (as in base.LogTo) outside the RWMutex will streamline performance when running in non-debug mode. (logLevel greater than 1)