Treat --log-level argument as case-insensitive

This commit is contained in:
Jack Riches 2017-04-02 12:22:56 +01:00
parent 87eb070ed6
commit ca200b1da7

View File

@ -198,6 +198,7 @@ base_parser.add_argument('-c', '--config',
'(use "-" for stdout)')
base_parser.add_argument('-l', '--log-level',
type=lambda l: l.upper(), # case insensitive conversion
choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
default='INFO',
help='Log level')