=======
logzero
=======
.. image:: https://img.shields.io/pypi/v/logzero.svg
:target: https://pypi.python.org/pypi/logzero
.. image:: https://img.shields.io/travis/metachris/logzero.svg
:target: https://travis-ci.org/metachris/logzero
.. image:: https://readthedocs.org/projects/logzero/badge/?version=latest
:target: https://logzero.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/metachris/logzero/shield.svg
:target: https://pyup.io/repos/github/metachris/logzero/
:alt: Updates
Robust and effective logging for Python 2 and 3.
.. image:: docs/_static/logo-small.png
:alt: Logo
:width: 300px
* GitHub repository: https://github.com/metachris/logzero
* Documentation: https://logzero.readthedocs.io
Features
--------
* Easy logging to console and/or file.
* Provides a fully configured standard `Python logger object <https://docs.python.org/2/library/logging.html#module-level-functions>`_.
* Pretty formatting, including level-specific colors in the console.
* Robust against str/bytes encoding problems, works with all kinds of character encodings and special characters.
* Multiple loggers can write to the same logfile (also across multiple Python files).
* Global default logger with `logzero.logger` and custom loggers with `logzero.setup_logger(..)`.
* Compatible with Python 2 and 3.
* All contained in a `single file`_.
* Licensed under the MIT license.
* Heavily inspired by the `Tornado web framework`_.
.. image:: docs/_static/demo_output.png
:alt: Demo output in color
:width: 300px
.. _single file: https://github.com/metachris/logzero/blob/master/logzero/__init__.py
.. _Tornado web framework: https://github.com/tornadoweb/tornado
Example Usage
-------------
.. code-block:: python
from logzero import logger
logger.debug("hello")
logger.info("info")
logger.warn("warn")
logger.error("error")
Take a look at the documentation for more information and examples:
* Documentation: https://logzero.readthedocs.io.
Installation
=============
Install `logzero` with `pip`_:
.. code-block:: console
$ pip install -U logzero
Future Features & Ideas
-----------------------
* Rotating Logfiles
* JSON output a la 12 factor app
* Send logs to remote log collector (maybe)
* Structured logging a la https://structlog.readthedocs.io/en/stable/index.html (maybe)
Related Projects
----------------
* https://structlog.readthedocs.io/en/stable/why.html
* https://12factor.net/logs
* fluentd, logstash
Notes: How to release a new version
-----------------------------------
via https://cookiecutter-pypackage.readthedocs.io/en/latest/pypi_release_checklist.html
# Run the tests
py.test
make lint
# Update history
vi HISTORY.rst
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
# Update version
bumpversion minor
# Push
git push && git push --tags
Credits
---------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
1.1.0 (2017-07-03)
------------------
* Bugfix: Disabled color logging to logfile
1.1.0 (2017-07-02)
------------------
* Global default logger instance (`logzero.logger`)
* Ability to reconfigure the default logger with (`logzero.setup_default_logger(..)`)
* More tests
* More documentation
1.0.0 (2017-06-27)
------------------
* Cleanup and documentation
0.2.0 (2017-06-12)
------------------
* Working logzero package with code and tests
0.1.0 (2017-06-12)
------------------
* First release on PyPI.
logzero
=======
.. image:: https://img.shields.io/pypi/v/logzero.svg
:target: https://pypi.python.org/pypi/logzero
.. image:: https://img.shields.io/travis/metachris/logzero.svg
:target: https://travis-ci.org/metachris/logzero
.. image:: https://readthedocs.org/projects/logzero/badge/?version=latest
:target: https://logzero.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/metachris/logzero/shield.svg
:target: https://pyup.io/repos/github/metachris/logzero/
:alt: Updates
Robust and effective logging for Python 2 and 3.
.. image:: docs/_static/logo-small.png
:alt: Logo
:width: 300px
* GitHub repository: https://github.com/metachris/logzero
* Documentation: https://logzero.readthedocs.io
Features
--------
* Easy logging to console and/or file.
* Provides a fully configured standard `Python logger object <https://docs.python.org/2/library/logging.html#module-level-functions>`_.
* Pretty formatting, including level-specific colors in the console.
* Robust against str/bytes encoding problems, works with all kinds of character encodings and special characters.
* Multiple loggers can write to the same logfile (also across multiple Python files).
* Global default logger with `logzero.logger` and custom loggers with `logzero.setup_logger(..)`.
* Compatible with Python 2 and 3.
* All contained in a `single file`_.
* Licensed under the MIT license.
* Heavily inspired by the `Tornado web framework`_.
.. image:: docs/_static/demo_output.png
:alt: Demo output in color
:width: 300px
.. _single file: https://github.com/metachris/logzero/blob/master/logzero/__init__.py
.. _Tornado web framework: https://github.com/tornadoweb/tornado
Example Usage
-------------
.. code-block:: python
from logzero import logger
logger.debug("hello")
logger.info("info")
logger.warn("warn")
logger.error("error")
Take a look at the documentation for more information and examples:
* Documentation: https://logzero.readthedocs.io.
Installation
=============
Install `logzero` with `pip`_:
.. code-block:: console
$ pip install -U logzero
Future Features & Ideas
-----------------------
* Rotating Logfiles
* JSON output a la 12 factor app
* Send logs to remote log collector (maybe)
* Structured logging a la https://structlog.readthedocs.io/en/stable/index.html (maybe)
Related Projects
----------------
* https://structlog.readthedocs.io/en/stable/why.html
* https://12factor.net/logs
* fluentd, logstash
Notes: How to release a new version
-----------------------------------
via https://cookiecutter-pypackage.readthedocs.io/en/latest/pypi_release_checklist.html
# Run the tests
py.test
make lint
# Update history
vi HISTORY.rst
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
# Update version
bumpversion minor
# Push
git push && git push --tags
Credits
---------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
1.1.0 (2017-07-03)
------------------
* Bugfix: Disabled color logging to logfile
1.1.0 (2017-07-02)
------------------
* Global default logger instance (`logzero.logger`)
* Ability to reconfigure the default logger with (`logzero.setup_default_logger(..)`)
* More tests
* More documentation
1.0.0 (2017-06-27)
------------------
* Cleanup and documentation
0.2.0 (2017-06-12)
------------------
* Working logzero package with code and tests
0.1.0 (2017-06-12)
------------------
* First release on PyPI.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logzero-1.1.1.tar.gz
(116.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logzero-1.1.1.tar.gz.
File metadata
- Download URL: logzero-1.1.1.tar.gz
- Upload date:
- Size: 116.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b419771c7ac3cabcef1be4b1367da46d831218356a0389c44c718479fefdcf4a
|
|
| MD5 |
b76a3be9967078612a94cf2366220b6d
|
|
| BLAKE2b-256 |
9d9061db4a0f562ce7b792aa9b3743c9d806d24611ad29ce6e335b5e52e461ec
|
File details
Details for the file logzero-1.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: logzero-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f4cbcbc41c77272a29c2a407dc086125c57b6a7a7fe2d142996a248bdbcbb83
|
|
| MD5 |
b05d2b5aa2b09bec1c19a84b0e15b8d8
|
|
| BLAKE2b-256 |
ffebbcb1ecc4e0e484ed231c984474bc0cb75a6ba34034aa95a41eaca52c076c
|