You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set SlowLog logging to TRACE in tests (#114344) (#114349)
The tests depend on the SlowLog loggers running at TRACE level
but were not setting the level themselves. Instead they relied
on the SlowLog setting the level to trace internally when it
was created. If something else globally adjusted log levels
between the time the SlowLog loggers were created and the tests
ran, the tests could fail.
And in fact, `ScopedSettingsTest.testFallbackToLoggerLevel` was
updating the root log level, which had the side effect of updating
the SlowLog level. In #112183 SlowLog's log initialization was made
static, which opened up its test to failure when ScopedSettingsTest
ran before a SlowLog test in the same JVM.
I do not know if the intention of the SlowLog is that it overrides
the global log level and should always be set at TRACE, in which case
this fix is incorrect. It seems surprising, but I don't know why else
SlowLog would explicitly initialize itself to TRACE. However, if that
was the intention, the code was already at risk due to having no
guard against being changed by Loggers.setLevel on an ancestor log.
The change in this PR is at least not a regression in that
behaviour. It does no longer start out at TRACE however, which is
a change in behaviour.
0 commit comments