Configure the logging mechanism. Args: use_debug (bool) Whether to configure debug-level logging.
(use_debug=False)
| 315 | |
| 316 | |
| 317 | def configure_logging(use_debug=False): |
| 318 | ''' Configure the logging mechanism. |
| 319 | |
| 320 | Args: |
| 321 | use_debug (bool) Whether to configure debug-level logging. |
| 322 | ''' |
| 323 | log_format = '%(levelname)s: %(message)s' |
| 324 | if use_debug: |
| 325 | logging.basicConfig(format=log_format, level=logging.DEBUG) |
| 326 | else: |
| 327 | logging.basicConfig(format=log_format, level=logging.INFO) |
| 328 | |
| 329 | |
| 330 | def parse_args(): |