Log formatting with colors!
colorlog.ColoredFormatter is a formatter for use with pythons logging module.
It allows colors to be placed in the format string, which is mostly useful when paired with a StreamHandler that is outputting to a terminal. This is accomplished by added a set of terminal color codes to the record before it is used to format the string.
- Sources inherited from project openSUSE:Backports:SLE-15-SP6
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout openSUSE:Leap:15.6/python-colorlog && cd $_
- Create Badge
Refresh
Refresh
Source Files
Filename | Size | Changed |
---|---|---|
colorlog-6.8.0.tar.gz | 0000029939 29.2 KB | |
python-colorlog.changes | 0000004951 4.83 KB | |
python-colorlog.spec | 0000001878 1.83 KB |
Latest Revision
Yuchen Lin (maxlin_factory)
accepted
request 1130979
from
Dirk Mueller (dirkmueller)
(revision 4)
- update to 6.8.0: * Fix running tests in environment with NO_COLOR=1 - Update to 6.7.0 no log - Update to 6.6.0: Changes since v6.4.1. * Add a force_color option to colorlog.formatter.ColoredFormatter. * Support the FORCE_COLOR environment variable. - Update to 6.4.1: Changes since v5.0.0. * Dropped support for Python 2 and Python versions below Python 3.5. * Added type hints and added mypy to CI (#83). * Support 256 colour ANSI codes (#88). * Support "light" ANSI codes (#87). * Support the NO_COLOR environment variable, and a no_color option (#70). * Updated various examples and documentation (#85). * Merged TTYColoredFormatter into ColoredFormatter, and ensure no ANSI codes are printed when colors are disabled. * Replaced LevelFormatter with a far simpler implementation. * Fixed version_info check for the Formatter validate parameter. * Define formatMessage instead of format, so that ColoredRecord is used in fewer places. * Use setuptool's "normalised" format for the version number. * Add PEP 561 typing marker so mypy can find type annotations. * Renamed internal modules. * colorlog.colorlog is now colorlog.formatter. * colorlog.logging is now colorlog.wrappers. * Removed colorlog.escape_codes object so that the colorlog.escape_codes module can be imported and used. * Import log levels from the logging module (#111). - Update to 5.0.1
Comments 0