MCPcopy
hub / github.com/rs/zerolog / SetGlobalLevel

Function SetGlobalLevel

globals.go:188–190  ·  view source on GitHub ↗

SetGlobalLevel sets the global override for log level. If this values is raised, all Loggers will use at least this value. To globally disable logs, set GlobalLevel to Disabled.

(l Level)

Source from the content-addressed store, hash-verified

186//
187// To globally disable logs, set GlobalLevel to Disabled.
188func SetGlobalLevel(l Level) {
189 atomic.StoreInt32(gLevel, int32(l))
190}
191
192// GlobalLevel returns the current global log level
193func GlobalLevel() Level {

Callers 7

ExampleFunction · 0.92
TestLevelWriterFunction · 0.85
TestDisabledLevelFunction · 0.85
TestPanicLevelFunction · 0.85
TestFatalLevelFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by 6

ExampleFunction · 0.74
TestLevelWriterFunction · 0.68
TestDisabledLevelFunction · 0.68
TestPanicLevelFunction · 0.68
TestFatalLevelFunction · 0.68