craigcondit commented on code in PR #446:
URL: https://github.com/apache/yunikorn-core/pull/446#discussion_r1017235700
##########
pkg/log/logger.go:
##########
@@ -23,50 +23,63 @@ import (
"fmt"
"reflect"
"sync"
+ "sync/atomic"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
var once sync.Once
-var logger *zap.Logger
-var config *zap.Config
+var holderValue atomic.Value
Review Comment:
This is here to allow dynamic reconfiguration of the logger. The overhead is
minimal (probably a few machine ops per logged statement).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]