class MyFormatter(logging.Formatter):

    def format(self, record):
        record.levelname = record.levelname.lower()
return logging.Formatter.format(self, record)
chformatter = MyFormatter('%(levelname)s %(message)s')
logging formatter to have lower-case level name