Merge pull request #4036 from eed3si9n/wip/fix-startup-log

Fixes -error not suppressing startup logs
This commit is contained in:
Dale Wijnand 2018-03-26 15:28:50 +01:00 committed by GitHub
commit b0f9fe77b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -229,8 +229,13 @@ object LogManager {
// s // s
// } // }
def setGlobalLogLevel(s: State, level: Level.Value): State = def setGlobalLogLevel(s: State, level: Level.Value): State = {
s.put(BasicKeys.explicitGlobalLogLevels, true).put(Keys.logLevel.key, level) val s1 = s.put(BasicKeys.explicitGlobalLogLevels, true).put(Keys.logLevel.key, level)
val gl = s1.globalLogging
LogExchange.unbindLoggerAppenders(gl.full.name)
LogExchange.bindLoggerAppenders(gl.full.name, (gl.backed -> level) :: Nil)
s1
}
// This is the default implementation for the relay appender // This is the default implementation for the relay appender
val defaultRelay: Unit => Appender = _ => defaultRelayImpl val defaultRelay: Unit => Appender = _ => defaultRelayImpl