We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e7f706 commit 4c5891cCopy full SHA for 4c5891c
logp/logger.go
@@ -53,6 +53,12 @@ func NewLogger(selector string, options ...LogOption) *Logger {
53
return newLogger(loadLogger().rootLogger, selector, options...)
54
}
55
56
+// NewNopLogger returns a no-op logger
57
+func NewNopLogger() *Logger {
58
+ logger := zap.NewNop()
59
+ return &Logger{logger, logger.Sugar()}
60
+}
61
+
62
// NewProductionLogger returns a production suitable logp.Logger
63
func NewProductionLogger(selector string, options ...LogOption) (*Logger, error) {
64
log, err := zap.NewProduction(options...)
0 commit comments