title: Python logging override dictConfig level
body: <p>I am using the following dictConfig for a logger. However, I am unable to modify the logging level at runtime.</p>
  
  <p><em>#contents of log_config.json</em></p>
  
  <pre><code>{
      "version": 1,
      "disable_existing_loggers": false,
      "formatters": {
          "simple": {
              "format": "%(asctime)s - %(name)-12s - %(levelname)-8s - %(message)s",
              "datefmt": "%Y-%m-%d %H:%M:%S"
          },
          "detailed": {
              "format": "%(asctime)s %(name)-12s %(module)-17s line:%(lineno)-4d %(levelname)-8s %(message)s",
              "datefmt": "%Y-%m-%d %H:%M:%S"
          }
      },
  
      "handlers": {
          "console": {
              "class": "logging.StreamHandler",
              "level": "INFO",
              "formatter": "simple",
              "stream": "ext://sys.stdout"
          },
  
          "info_file_handler": {
              "class": "logging.handlers.TimedRotatingFileHandler",
              "level": "INFO",
              "formatter": "detailed",
              "filename": "info.log",
              "when": "midnight",
              "backupCount": 7,
              "encoding": "utf8"
          },
  
          "error_file_handler": {
              "class": "logging.handlers.TimedRotatingFileHandler",
              "level": "ERROR",
              "formatter": "detailed",
              "filename": "errors.log",
              "when": "midnight",
              "backupCount": 7,
              "encoding": "utf8"
          }
      },
  
      "loggers": {
          "": {
              "level": "ERROR",
              "handlers": ["console"],
              "propagate": "no"
          }
      },
  
      "root": {
          "level": "NOTSET",
          "handlers": ["console", "info_file_handler", "error_file_handler"]
      }
  }
  </code></pre>
  
  <p>I then get the logger and set the level using:</p>
  
  <pre><code>with open('/path/to/log_config.json', 'r') as fd:
      cfg = json.load(fd)
  
  logging.config.dictConfig(cfg)
  logger = logging.getLogger(__name__)
  logger.setLevel(10)
  </code></pre>
  
  <p>But, because the logger was created using the dictConfig I am not able to override the levels. I would like to build a UI tool which has an option menu to adjust the logging levels at runtime without having to crack open code or the json file to make adjustments. I am able to adjust the level higher, but for some reason it will not let the level go lower...</p>
  
  <p>What I would like to do is set the info_file and console handlers to INFO (20) in the config, and then have the option to change them to DEBUG (10) at runtime. Any ideas?</p>