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

Function L

global.go:48–53  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

46// L returns the global Logger, which can be reconfigured with ReplaceGlobals.
47// It's safe for concurrent use.
48func L() *Logger {
49 _globalMu.RLock()
50 l := _globalL
51 _globalMu.RUnlock()
52 return l
53}
54
55// S returns the global SugaredLogger, which can be reconfigured with
56// ReplaceGlobals. It's safe for concurrent use.

Callers 3

ExampleReplaceGlobalsFunction · 0.92
TestReplaceGlobalsFunction · 0.85
TestGlobalsConcurrentUseFunction · 0.85

Calls

no outgoing calls

Tested by 3

ExampleReplaceGlobalsFunction · 0.74
TestReplaceGlobalsFunction · 0.68
TestGlobalsConcurrentUseFunction · 0.68