xolox / python-coloredlogs

Colored terminal output for Python's logging module
https://coloredlogs.readthedocs.io
MIT License
545 stars 44 forks source link

Proposal to change argument order in constructor to be consistent with stdlib #75

Closed FlorianLudwig closed 4 years ago

FlorianLudwig commented 5 years ago

Current constructor:

def __init__(self, fmt=None, datefmt=None, level_styles=None, field_styles=None, style=DEFAULT_FORMAT_STYLE):

The python standard lib expects the first three parameters to be fmt, datefmt, style.

To make coloredlogs usable with the config system in the stdlib I like to propose to move the style.

xolox commented 4 years ago

Hi Florian and thanks for the feedback. I've just released coloredlogs 12.0 which changes the order of positional arguments to be compatible with the Python standard library.