MCPcopy
hub / github.com/uber-go/zap / S

Function S

global.go:57–62  ·  view source on GitHub ↗

S returns the global SugaredLogger, which can be reconfigured with ReplaceGlobals. It's safe for concurrent use.

()

Source from the content-addressed store, hash-verified

55// S returns the global SugaredLogger, which can be reconfigured with
56// ReplaceGlobals. It's safe for concurrent use.
57func S() *SugaredLogger {
58 _globalMu.RLock()
59 s := _globalS
60 _globalMu.RUnlock()
61 return s
62}
63
64// ReplaceGlobals replaces the global Logger and SugaredLogger, and returns a
65// function to restore the original values. It's safe for concurrent use.

Callers 2

TestReplaceGlobalsFunction · 0.85
TestGlobalsConcurrentUseFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestReplaceGlobalsFunction · 0.68
TestGlobalsConcurrentUseFunction · 0.68