MCPcopy Create free account
hub / github.com/AdRoll/baker / SetLogLevel

Function SetLogLevel

testutil/helpers.go:104–108  ·  view source on GitHub ↗

SetLogLevel sets the global log level for the execution of the current tb. Though setting the log level is safe for use from concurrent goroutines, it's not advised to use SetLogLevel in parallel tests/benchmark, i.e. using t.Parallel().

(tb testing.TB, level log.Level)

Source from the content-addressed store, hash-verified

102// not advised to use SetLogLevel in parallel tests/benchmark, i.e. using
103// t.Parallel().
104func SetLogLevel(tb testing.TB, level log.Level) {
105 cur := log.GetLevel()
106 log.SetLevel(level)
107 tb.Cleanup(func() { log.SetLevel(cur) })
108}

Callers 1

TestSQSFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestSQSFunction · 0.74