We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 289d7b3 commit e6b2fb2Copy full SHA for e6b2fb2
1 file changed
log/logger.go
@@ -3,6 +3,7 @@ package log
3
import (
4
"sync/atomic"
5
6
+ "go.uber.org/zap"
7
"go.uber.org/zap/zapcore"
8
)
9
@@ -53,6 +54,11 @@ func Init(config *Config, attrs map[string]any) {
53
54
))
55
}
56
57
+// StdBackend returns the underlying *zap.Logger instance from the global logger.
58
+func StdBackend() *zap.Logger {
59
+ return std.Load().logger.Desugar()
60
+}
61
+
62
// Sync flushes any buffered log entries to their destinations.
63
// This should typically be called before application shutdown to ensure all logs are written.
64
func Sync() error {
0 commit comments