The purpose of this document is to list all of the notable changes to this project. The format was inspired by Keep a Changelog. This project adheres to semantic versioning.
- Release 10.0.1 (2019-07-13)
- Release 10.0 (2018-05-13)
- Release 9.3.1 (2018-04-30)
- Release 9.3 (2018-04-29)
- Release 9.2 (2018-04-27)
- Release 9.1 (2018-04-26)
- Release 9.0 (2018-01-17)
- Release 8.0 (2018-01-05)
- Release 7.3.3 (2018-01-05)
- Release 7.3.2 (2018-01-05)
- Release 7.3.1 (2017-11-23)
- Release 7.3 (2017-08-07)
- Release 7.2 (2017-08-07)
- Release 7.1 (2017-07-15)
- Release 7.0.1 (2017-07-15)
- Release 7.0 (2017-05-18)
- Release 6.4 (2017-05-17)
- Release 6.3 (2017-05-17)
- Release 6.2 (2017-05-17)
- Release 6.1 (2017-04-17)
- Release 6.0 (2017-03-10)
- Release 5.2 (2016-11-01)
- Release 5.1.1 (2016-10-10)
- Release 5.1 (2016-10-09)
- Release 5.0 (2015-11-14)
- Release 4.0 (2015-11-14)
- Release 3.5 (2015-11-13)
- Release 3.4 (2015-11-13)
- Release 3.3 (2015-11-13)
- Release 3.2 (2015-11-12)
- Release 3.1.4 (2015-10-31)
- Release 3.1.3 (2015-10-27)
- Release 3.1.2 (2015-10-24)
- Release 3.1.1 (2015-10-23)
- Release 3.1 (2015-10-23)
- Release 3.0 (2015-10-23)
- Release 2.0 (2015-10-14)
- Release 1.0.1 (2015-06-02)
- Release 1.0 (2015-05-27)
- Release 0.8 (2014-10-03)
- Release 0.7.1 (2014-10-02)
- Release 0.7 (2014-10-02)
- Release 0.6 (2014-09-21)
- Release 0.5 (2014-05-10)
- Release 0.4.9 (2014-05-03)
- Release 0.4.8 (2013-10-19)
- Release 0.4.7 (2013-09-29)
- Release 0.4.6 (2013-08-07)
- Release 0.4.5 (2013-08-07)
- Release 0.4.4 (2013-08-07)
- Release 0.4.3 (2013-07-21)
- Release 0.4.2 (2013-07-21)
- Release 0.4.1 (2013-07-20)
- Release 0.4 (2013-07-20)
- Release 0.3.1 (2013-07-01)
- Release 0.3 (2013-06-06)
- Release 0.2 (2013-05-31)
- Release 0.1 (2013-05-16)
Release 10.0.1 (2019-07-13)
- Change all "color" references to "colour".
- A bug with UTC timezones was fixed in the tests.
Release 10.0 (2018-05-13)
Proper format string parsing, support for style='{'
(#11, #17, #52).
Until now colouredlogs has required differently coloured fields in logging format strings to be delimited by whitespace, leading to various issues:
- Back in December 2015 issue #11 was reported by someone who had expected to be able to style fields without whitespace in between differently.
- Until #52 was merged (released as 9.2 in April 2018) any whitespace would be collapsed to a single space, simply as a side effect of splitting on whitespace.
- This implementation was so naive that it didn't support whitespace as a
padding character in
%()
formatting directives, because it wasn't able to distinguish formatting directives from surrounding text.
In order to properly fix #11 I'm now introducing a very different approach that does distinguish formatting directives from their surrounding text, which means whitespace is no longer required. However in order to reduce the conceptual incompatibilities between the old versus new approach whitespace is still significant, as follows:
- First the logging format string is separated into formatting directives
versus surrounding text (which means whitespace used as a padding character
in a
%()
formatting directive is considered to be part of the formatting directive, as it should). - Then formatting directives and surrounding text are grouped based on whitespace delimiters (in the surrounding text).
- For each group styling is selected as follows:
- If the group contains a single formatting directive that has a style defined then the whole group is styled accordingly. This is the behavior which provides (some level of) conceptual backwards compatibility.
- If the group contains multiple formatting directives that have styles defined then each formatting directive is styled individually and surrounding text isn't styled (this behavior is backwards incompatible but arguably an improvement over the old behavior).
While I was working on the improved format string parsing I figured it was
easiest to include support for style='{'
(requested in #17) from the
start in the new implementation, given that I was redoing the affected code
anyway.
Release 9.3.1 (2018-04-30)
Bug fix: Restore MacOS compatibility after publishing release 9.3.
The following build failure became apparent to me just minutes after publishing release 9.3 so I decided to change the implementation: https://travis-ci.org/xolox/python-coloredlogs/jobs/372806733
Release 9.3 (2018-04-29)
Enable flexible millisecond formatting using the %f
directive (#45).
Release 9.2 (2018-04-27)
- Merged pull request #47: Switch to
logging.getLogRecordFactory()
. In the merge commit I added a small performance enhancement by checking for the existence oflogging.getLogRecordFactory()
just once, when aColouredFormatter
object is instantiated. - Merged pull request #52: Don't change whitespace in format strings. In the
merge commit I promoted the inline function to an instance method so that it
can be reused by sub classes of
ColouredFormatter
.
Release 9.1 (2018-04-26)
Release 9.0 (2018-01-17)
Added support for background colours and 256 colour mode (#35).
Most of the changes required for this were actually implemented in the humanfriendly package (see issue #35). The changes in colouredlogs are mostly related to the ANSI to HTML conversion.
One unrelated change was made, that was to use faint green for the SPAM
log
level (to distinguish it from DEBUG
).
New features in ANSI to HTML conversion:
- Support for bright and faint colours.
- Support for underlined, strike-through and inverse text styles.
Bug fixes in ANSI to HTML conversion:
- The scheme of URLs is no longer stripped from visible output.
- Support for
\x1b[m
as a short hand for\x1b[0m
(I only learned about this today when I didn't understand the empty ANSI escape sequence at the end of each line emitted byhg log
). - Ensure that the pattern for URLs doesn't capture ANSI sequences.
- Documenting how it all works. This will follow in the next commit which is going to be a rather big one (hence why I see some value in keeping it separate from the implementation changes).
Miscellaneous changes:
- Add installation instructions to readme.
- Improve screenshots in documentation.
- Automate taking of screen shots :-).
Release 8.0 (2018-01-05)
Set the default date format in a new formatTime()
method (#42).
I decided to bump the major version number because this change is technically
backwards incompatible, even though it concerns a minor detail (datefmt
being set to its default value in the initializer). Then again, this change
does improve compatibility with the behavior of the logging.Formatter
class
in Python's standard library, so there's that :-).
Release 7.3.3 (2018-01-05)
Bug fix for colouredlogs --demo
so that it always displays the DEBUG
message (#41).
Release 7.3.2 (2018-01-05)
Bug fixes and improvements to ANSI to HTML conversion:
- Make sure that conversion of empty input produces no output.
- Strip bogus
^D
from output captured on MacOS. - Increase test coverage on MacOS via Travis CI.
Release 7.3.1 (2017-11-23)
Bug fix for get_install_requires()
in setup.py
script (fixes #43).
Release 7.3 (2017-08-07)
Added support for the SUCCESS
log level (related to #27 and verboselogs
issue #4).
Release 7.2 (2017-08-07)
Merged pull requests #34, #37 and #38:
- Include the files needed to generate the Sphinx documentation in source distributions published to PyPI (#34).
- Improve documentation by removing usage of deprecated
logger.warn()
function (#37). - Improve documentation by using module
__name__
variable for logger name (#38). - Also fixed the test suite after verboselogs 1.7 was released.
Release 7.1 (2017-07-15)
Make it easy to output milliseconds and improve documentation on this (#16).
Release 7.0.1 (2017-07-15)
Try to improve robustness during garbage collection (related to #33).
Release 7.0 (2017-05-18)
This release improves the robustness of ANSI to HTML conversion:
- Don't break ANSI to HTML conversion on output encoding errors.
- Gracefully handle unsupported colours in converter module.
- Make it even easier to integrate with
cron
. - Improved the HTML encoding of whitespace.
- Wrap generated HTML in
<code>
by default. - Reduced the size of generated HTML (really CSS).
- Reduced internal duplication of constants.
Release 6.4 (2017-05-17)
Mention colorama.init()
in the documentation (fixes #25).
Release 6.3 (2017-05-17)
Bug fix: Avoid copy.copy()
deadlocks (fixes #29).
This was a rather obscure issue and I expect this not to to affect most users, but the reported breakage was definitely not intended, so it was a bug I wanted to fix.
Release 6.2 (2017-05-17)
Enable runtime patching of sys.stderr
(related to #30 and #31).
Release 6.1 (2017-04-17)
- Bug fix: Adjust logger level in
set_level()
,increase_verbosity()
, etc. (this is a follow up to release 6.0). - Bug fix: Never enable system logging on Windows.
- Increase test coverage (using mocking).
- Document Python 3.6 support.
Release 6.0 (2017-03-10)
Two backwards incompatible changes were made:
- Changed log level handling in
colouredlogs.install()
. - Changed the default system logging level from
DEBUG
toINFO
. To make it easier to restore the old behavior,colouredlogs.install(syslog='debug')
is now supported.
The old and problematic behavior was as follows:
colouredlogs.install()
would unconditionally change the log level of the root logger tologging.NOTSET
(changing it from the root logger's default levellogging.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 whenenable_system_logging()
was used in isolation frominstall()
the default log level would implicitly be set tologging.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 colouredlogs package, it was clearly the number one cause of confusion for users. Here are some examples:
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 5.2 (2016-11-01)
Merged pull request #19: Automatically call colouredlogs.install()
if
COLOUREDLOGS_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
COLOUREDLOGS_AUTOUSE
toCOLOUREDLOGS_AUTO_INSTALL
(in order to make it consistent with the other environment variables) and added to the documentation. - The
colouredlogs.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 extendingauto_install()
. I seriously dislike writing out complex code in a single line, especially when dealing with Python code :-). - The
colouredlogs.pth
file has been added toMANIFEST.in
to make sure thatpython 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 thelib/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 undertox
, which runspip install
under the hood, which in turn runspython setup.py bdist_wheel
under the hood to enable wheel caching.
Release 5.1.1 (2016-10-10)
- Starting from this release wheel distributions are published to PyPI.
- Refactored makefile and setup script (checkers, docs, wheels, twine, etc).
- Replaced
colouredlogs.readthedocs.org
withcolouredlogs.readthedocs.io
everywhere.
Release 5.1 (2016-10-09)
- Bug fix: Enable command capturing on MacOS (fixes #12).
- Add styles for the
SPAM
andNOTICE
levels added by my verboselogs package. - Set up automated MacOS tests on Travis CI.
- Documented Python 3.5 support.
Release 5.0 (2015-11-14)
- Remove
ColouredStreamHandler
and related functionality, thereby breaking backwards compatibility. - Remove Vim syntax script (impossible given user defined log formats :-).
- Improve test coverage.
Release 4.0 (2015-11-14)
Enable reconfiguration (also: get rid of global root handler).
Release 3.5 (2015-11-13)
- Bug fix: Never install duplicate syslog handlers.
- Added
walk_propagation_tree()
function (not useful in isolation :-). - Added
find_handler()
function (still not very useful in isolation).
Release 3.4 (2015-11-13)
Make it very easy to enable system logging.
Release 3.3 (2015-11-13)
Easy to use UNIX system logging?! I know this is unrelated to the name of this project - refer to the added documentation for more on that :-).
Release 3.2 (2015-11-12)
- Enable
%(programname)s
based onsys.argv[0]
. - Increase test coverage.
Release 3.1.4 (2015-10-31)
Bug fix: Don't use bold font on Windows (follow up to previous change).
Release 3.1.3 (2015-10-27)
Bug fix: Don't use bold font on Windows (not supported). For future reference, I found this issue here: https://ci.appveyor.com/project/xolox/pip-accel/build/1.0.15
Release 3.1.2 (2015-10-24)
Bug fix for log format colourization (fixes #9).
Rationale: I'm not validating the format, I just want to extract the referenced
field names, so looking for %(..)
without a trailing type specifier (and
optional modifiers) is fine here.
Release 3.1.1 (2015-10-23)
Fixed broken Colourama reference in README.rst
because it breaks the reStructuredText rendering on PyPI.
Release 3.1 (2015-10-23)
Depend on and use Colourama on Windows (as suggested in #2). I can't actually test this because I don't have access to a Windows system, but I guess some day someone will complain if this doesn't work as intended ;-).
Release 3.0 (2015-10-23)
Major rewrite: Added ColouredFormatter
, deprecated ColouredStreamHandler
.
- Fixed #2 by switching from
connected_to_terminal()
toterminal_supports_colours()
(the latter understands enough about Windows to know it doesn't support ANSI escape sequences). - Fixed #6 by adding support for user defined formats (even using a custom
filter to enable the use of
%(hostname)s
:-). - Fixed #7 by adding support for user defined formats and making
colouredlogs.install()
an almost equivalent oflogging.basicConfig()
.
This rewrite mostly resolves pip-accel issue #59. Basically all that's
missing is a configuration option in pip-accel to make it easier to customize
the log format, although that can now be done by setting
$COLOUREDLOGS_LOG_FORMAT
.
Release 2.0 (2015-10-14)
- Backwards incompatible: Change
ansi2html
tocolouredlogs --convert
(see #8). - Implement and enforce PEP-8 and PEP-257 compliance.
- Change Read the Docs links to use HTTPS.
- Move ad-hoc coverage configuration from
Makefile
to.coveragerc
.
Release 1.0.1 (2015-06-02)
- Bug fix for obscure
UnicodeDecodeError
insetup.py
(only on Python 3). - Document PyPy as a supported (tested) Python implementation.
Release 1.0 (2015-05-27)
- Move
colouredlogs.ansi_text()
tohumanfriendly.ansi_wrap()
. - Update
setup.py
to add trove classifiers and stop importing__version__
. - Start linking to Read the Docs as the project homepage.
Release 0.8 (2014-10-03)
- Merged pull request #5 which makes the severity to colour mapping configurable.
- Added support for bold / faint / underline / inverse / strike through text styles. This extends the changes in pull request #5 into a generic severity ↔ colour / style mapping and adds support for five text styles.
- Added a coverage badge to the readme.
Release 0.7.1 (2014-10-02)
Bug fix: Restore Python 3.4 compatibility.
Release 0.7 (2014-10-02)
- First stab at a proper test suite (already >= 90% coverage)
- Prepare to publish documentation on Read the Docs.
Release 0.6 (2014-09-21)
Added decrease_verbosity()
function (and simplify increase_verbosity()
).
Release 0.5 (2014-05-10)
- Merge pull request #4 adding Python 3 compatibility.
- Start using Travis CI (so I don't accidentally drop Python 3 compatibility).
- Document supported Python versions (2.6, 2.7 & 3.4).
- Move demo code to separate
colouredlogs.demo
module.
Release 0.4.9 (2014-05-03)
Make the ansi2html
command a bit more user friendly.
Release 0.4.8 (2013-10-19)
Make it possible to use /etc/debian_chroot
instead of socket.gethostname()
.
Release 0.4.7 (2013-09-29)
Added is_verbose()
function (another easy shortcut :-).
Release 0.4.6 (2013-08-07)
Added increase_verbosity()
function (just an easy shortcut).
Release 0.4.5 (2013-08-07)
ColouredStreamHandler
now supports filtering on log level.
Release 0.4.4 (2013-08-07)
Bug fix: Protect against sys.stderr.isatty()
not being defined.
Release 0.4.3 (2013-07-21)
Change: Show the logger name by default.
Release 0.4.2 (2013-07-21)
Added colouredlogs.install()
function.
Release 0.4.1 (2013-07-20)
Bug fix for ansi2html
: Don't leave typescript
files behind.
Release 0.4 (2013-07-20)
Added ansi2html
program to convert coloured text to HTML.
Release 0.3.1 (2013-07-01)
Bug fix: Support Unicode format strings (issue #3).
Release 0.3 (2013-06-06)
Merge pull request #1: Refactor timestamp and name formatting into their own methods so callers can override the format. I made the following significant changes during merging:
- Added docstrings & mention subclassing in
README.md
- Don't call
os.getpid()
when the result won't be used. - Don't call
render_*()
methods when results won't be used.
Release 0.2 (2013-05-31)
- Change text styles (seems like an improvement to me)
- Integration with my just released verboselogs module.
- Improve the readme (with screenshots).
- Add PyPI link to
colouredlogs.py
. - Add URL to
setup.py
. - Vim syntax mode for coloured logs!
Release 0.1 (2013-05-16)
Initial commit.