Skip to content

Instantly share code, notes, and snippets.

@njarvis
njarvis / coloredformatter.py
Created September 7, 2017 10:53
Using coloredlogs.ColoredFormatter with logging.config.fileConfig
# -*- coding: utf-8 -*-
import coloredlogs
class ColoredFormatter(coloredlogs.ColoredFormatter):
def __init__(self, fmt=None, datefmt=None, style='%'):
'''Match coloredlogs.ColoredFormatter arguments with logging.Formatter'''
coloredlogs.ColoredFormatter.__init__(self, fmt=fmt, datefmt=datefmt)

Keybase proof

I hereby claim:

  • I am njarvis on github.
  • I am njarvis (https://keybase.io/njarvis) on keybase.
  • I have a public key ASDnipMaiALK5RaW-6klL7x4848kzJJDBm1Xm0ygecviqAo

To claim this, I am signing this object: