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
@@ -229,8 +229,13 @@ object LogManager {
// s
// }
def setGlobalLogLevel(s: State, level: Level.Value): State =
s.put(BasicKeys.explicitGlobalLogLevels, true).put(Keys.logLevel.key, level)
def setGlobalLogLevel(s: State, level: Level.Value): State = {
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
val defaultRelay: Unit => Appender = _ => defaultRelayImpl