public void configureLoggers() {
        Level level = getTopLevelCommandLoggingMixin(mixee).calcLogLevel();

        LoggerContext loggerContext = LoggerContext.getContext(false);
        LoggerConfig rootConfig = loggerContext.getConfiguration().getRootLogger();
        for (Appender appender : rootConfig.getAppenders().values()) {
            if (appender instanceof ConsoleAppender) {
                rootConfig.removeAppender(appender.getName());
                rootConfig.addAppender(appender, level, null);
            }
        }
        if (rootConfig.getLevel().isMoreSpecificThan(level)) {
            rootConfig.setLevel(level);
        }
        loggerContext.updateLoggers(); // apply the changes
    }
Taken from https://github.com/remkop/picocli/blob/master/picocli-examples/src/main/java/picocli/examples/logging_mixin_advanced/LoggingMixin.java
migration-assistant/src/main/java/io/apiman/migration/util/LoggingMixin.java