mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Configure log LevelChangePropagator
This commit is contained in:
parent
e61f587bfc
commit
d351f64fb1
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@ import ch.qos.logback.classic.Level;
|
|||
import ch.qos.logback.classic.Logger;
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
import ch.qos.logback.classic.PatternLayout;
|
||||
import ch.qos.logback.classic.jul.LevelChangePropagator;
|
||||
import ch.qos.logback.classic.spi.Configurator;
|
||||
import ch.qos.logback.classic.spi.ILoggingEvent;
|
||||
import ch.qos.logback.core.ConsoleAppender;
|
||||
|
@ -36,6 +37,9 @@ public class LogConfigurator extends ContextAwareBase implements Configurator {
|
|||
|
||||
@Override
|
||||
public ExecutionStatus configure(LoggerContext lc) {
|
||||
lc.addListener(new LevelChangePropagator() {{
|
||||
setContext(lc);
|
||||
}});
|
||||
final var rootLogger = lc.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
|
||||
final var defaultLevel = verboseLevel > 1 ? Level.ALL : verboseLevel > 0 ? Level.INFO : Level.WARN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue