Coloredlogs

Latest version: v15.0.1

Safety actively analyzes 626513 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 12

6.0

---------------------------

Two backwards incompatible changes were made:

- Changed log level handling in ``coloredlogs.install()``.
- Changed the default system logging level from ``DEBUG`` to ``INFO``. To make
it easier to restore the old behavior, ``coloredlogs.install(syslog='debug')``
is now supported.

The old and problematic behavior was as follows:

- ``coloredlogs.install()`` would unconditionally change the log level of the
root logger to ``logging.NOTSET`` (changing it from the root logger's default
level ``logging.WARNING``) and the log levels of handler(s) would control
which log messages were actually emitted.

- ``enable_system_logging()`` would never change the root logger's log level,
which meant that when ``enable_system_logging()`` was used in isolation from
``install()`` the default log level would implicitly be set to
``logging.WARNING`` (the default log level of the root logger).

Over the years I've gotten a lot of feedback about the log level handling in
the coloredlogs package, it was clearly the number one cause of confusion for
users. Here are some examples:

- https://github.com/xolox/python-coloredlogs/issues/14
- https://github.com/xolox/python-coloredlogs/issues/18
- https://github.com/xolox/python-coloredlogs/pull/21
- https://github.com/xolox/python-coloredlogs/pull/23
- https://github.com/xolox/python-coloredlogs/issues/24

My hope is that with the changes I've made in the past days, the experience for
new users will be more 'Do What I Mean' and less 'What The Fuck is Going On
Here?!' :-). Of course only time (and feedback, or lack thereof) will tell
whether I've succeeded.

.. _Release 6.0: https://github.com/xolox/python-coloredlogs/compare/5.2...6.0

5.2

---------------------------

Merged pull request `19`_: Automatically call ``coloredlogs.install()`` if
``COLOREDLOGS_AUTO_INSTALL=true``.

While merging this pull request and writing tests for it I changed
the implementation quite a bit from the original pull request:

- The environment variable was renamed from ``COLOREDLOGS_AUTOUSE`` to
``COLOREDLOGS_AUTO_INSTALL`` (in order to make it consistent with the other
environment variables) and added to the documentation.

- The ``coloredlogs.pth`` file was changed in order to reduce the amount of
code required inside the ``*.pth`` file as much as possible and create room
to grow this feature if required, by extending ``auto_install()``. I
seriously dislike writing out complex code in a single line, especially when
dealing with Python code :-).

- The ``coloredlogs.pth`` file has been added to ``MANIFEST.in`` to make sure
that ``python setup.py sdist`` copies the ``*.pth`` file into the source
distribution archives published to PyPI.

- The ``setup.py`` script was changed to figure out the location of the
``lib/pythonX.Y/site-packages`` directory using distutils instead of 'hard
coding' the site-packages name (which I dislike for various reasons).

- The ``setup.py`` script was changed to preserve compatibility with universal
wheel distributions using what looks like an undocumented hack found through
trial and error (the other hacks I found were much worse :-). I ran into this
incompatibility when running the tests under ``tox``, which runs ``pip
install`` under the hood, which in turn runs ``python setup.py bdist_wheel``
under the hood to enable wheel caching.

.. _Release 5.2: https://github.com/xolox/python-coloredlogs/compare/5.1.1...5.2
.. _19: https://github.com/xolox/python-coloredlogs/pull/19

5.1.1

-----------------------------

- Starting from this release wheel distributions are published to PyPI.
- Refactored makefile and setup script (checkers, docs, wheels, twine, etc).
- Replaced ``coloredlogs.readthedocs.org`` with ``coloredlogs.readthedocs.io`` everywhere.

.. _Release 5.1.1: https://github.com/xolox/python-coloredlogs/compare/5.1...5.1.1

5.1

---------------------------

- Bug fix: Enable command capturing on MacOS (fixes `12`_).
- Add styles for the ``SPAM`` and ``NOTICE`` levels added by my verboselogs_ package.
- Set up automated MacOS tests on Travis CI.
- Documented Python 3.5 support.

.. _Release 5.1: https://github.com/xolox/python-coloredlogs/compare/5.0...5.1
.. _12: https://github.com/xolox/python-coloredlogs/issues/12

5.0

---------------------------

- Remove ``ColoredStreamHandler`` and related functionality, thereby breaking backwards compatibility.
- Remove Vim syntax script (impossible given user defined log formats :-).
- Improve test coverage.

.. _Release 5.0: https://github.com/xolox/python-coloredlogs/compare/4.0...5.0

4.0

---------------------------

Enable reconfiguration (also: get rid of global root handler).

.. _Release 4.0: https://github.com/xolox/python-coloredlogs/compare/3.5...4.0

Page 6 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.