public void changeLevel(LoggerLevel level) {
    Level logbackLevel = Level.toLevel(level.name());
    database.enableSqlLogging(level == TRACE);
    helper.changeRoot(serverProcessLogging.getLogLevelConfig(), logbackLevel);
    LoggerFactory.getLogger(ServerLogging.class).info("Level of logs changed to {}", level);
  }
@Test
  public void changeLevel_fails_with_IAE_when_level_is_ERROR() {
    assertThatThrownBy(() -> underTest.changeLevel(ERROR))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("ERROR log level is not supported (allowed levels are [TRACE, DEBUG, INFO])");
  }