././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 010212 x ustar 00 28 mtime=1615980257.5136695
logzero-1.7.0/ 0000755 0001751 0000171 00000000000 00000000000 012540 5 ustar 00runner docker ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/CONTRIBUTING.rst 0000644 0001751 0000171 00000006222 00000000000 015203 0 ustar 00runner docker .. highlight:: shell
============
Contributing
============
Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions
----------------------
Report Bugs
~~~~~~~~~~~
Report bugs at https://github.com/metachris/logzero/issues.
If you are reporting a bug, please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
Fix Bugs
~~~~~~~~
Look through the GitHub issues for bugs. Anything tagged with "bug"
and "help wanted" is open to whoever wants to implement it.
Implement Features
~~~~~~~~~~~~~~~~~~
Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~
logzero could always use more documentation, whether as part of the
official logzero docs, in docstrings, or even on the web in blog posts,
articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at https://github.com/metachris/logzero/issues.
If you are proposing a feature:
* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)
Get Started!
------------
Ready to contribute? Here's how to set up `logzero` for local development.
1. Fork the `logzero` repo on GitHub.
2. Clone your fork locally::
$ git clone git@github.com:your_name_here/logzero.git
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
$ mkvirtualenv logzero
$ cd logzero/
$ python setup.py develop
4. Create a branch for local development::
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
$ flake8 logzero tests
$ python setup.py test or py.test
$ tox
To get flake8 and tox, just pip install them into your virtualenv.
6. Commit your changes and push your branch to GitHub::
$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature
7. Submit a pull request through the GitHub website.
Pull Request Guidelines
-----------------------
Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.4, 3.5, 3.6 and for PyPy. Check
https://travis-ci.org/metachris/logzero/pull_requests
and make sure that the tests pass for all supported Python versions.
Tips
----
To run a subset of tests::
$ py.test tests.test_logzero
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/HISTORY.md 0000644 0001751 0000171 00000006124 00000000000 014226 0 ustar 00runner docker History
=======
1.6.5 (2021-03-17)
------------------
- Export loglevels directly (you can use eg. `logzero.DEBUG` instead of `logging.DEBUG`)
- `setup_default_logger` use `backupCount`
- Update dependencies
- PRs: (386)[https://github.com/metachris/logzero/pull/386]
1.6.3 (2020-11-15)
------------------
- JSON logging with UTF-8 enabled by default ([PR 357](https://github.com/metachris/logzero/pull/357))
1.6.0 (1.6.2) (2020-10-29)
--------------------------
- JSON logging support ([PR 344][])
- Ability to easily change colors ([\#82][])
- Allow creating a root logger ([\#342][])
- Bugfix: file logging with lower loglevel than stream ([PR 338][])
- Running tests with Python up to 3.9
- Dependency updates
1.5.0 (2018-03-07)
------------------
- `logzero.syslog(..)` ([PR 83][])
1.4.0 (2018-03-02)
------------------
- Allow Disabling stderr Output ([PR 83][1])
1.3.0 (2017-07-19)
------------------
- Color output now works in Windows (supported by colorama)
1.2.1 (2017-07-09)
------------------
- Logfiles with custom loglevels (eg. stream handler with DEBUG and
file handler with ERROR).
1.2.0 (2017-07-05)
------------------
- Way better API for configuring the default logger with logzero.loglevel(..), logzero.logfile(..), etc.
- Built-in rotating logfile support.
``` python
import logging
import logzero
from logzero import logger
# This log message goes to the console
logger.debug("hello")
# Set a minimum log level
logzero.loglevel(logging.INFO)
# Set a logfile (all future log messages are also saved there)
logzero.logfile("/tmp/logfile.log")
# Set a rotating logfile (replaces the previous logfile handler)
logzero.logfile("/tmp/rotating-logfile.log", maxBytes=1000000, backupCount=3)
# Disable logging to a file
logzero.logfile(None)
# Set a custom formatter
formatter = logging.Formatter('%(name)s - %(asctime)-15s - %(levelname)s: %(message)s');
logzero.formatter(formatter)
# Log some variables
logger.info("var1: %s, var2: %s", var1, var2)
```
1.1.2 (2017-07-04)
------------------
- Better reconfiguration of handlers, doesn't remove custom handlers
anymore
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.
[PR 344]: https://github.com/metachris/logzero/pull/344
[\#82]: https://github.com/metachris/logzero/issues/82
[\#342]: https://github.com/metachris/logzero/pull/342
[PR 338]: https://github.com/metachris/logzero/pull/338
[PR 83]: https://github.com/metachris/logzero/pull/84
[1]: https://github.com/metachris/logzero/pull/83
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/LICENSE 0000644 0001751 0000171 00000002057 00000000000 013551 0 ustar 00runner docker
MIT License
Copyright (c) 2017, Chris Hager
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/MANIFEST.in 0000644 0001751 0000171 00000000365 00000000000 014302 0 ustar 00runner docker include CONTRIBUTING.rst
include HISTORY.md
include LICENSE
include README.md
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-include docs *.rst *.md conf.py Makefile make.bat *.jpg *.png *.gif
././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 010212 x ustar 00 28 mtime=1615980257.5136695
logzero-1.7.0/PKG-INFO 0000644 0001751 0000171 00000034072 00000000000 013643 0 ustar 00runner docker Metadata-Version: 2.1
Name: logzero
Version: 1.7.0
Summary: Robust and effective logging for Python 2 and 3
Home-page: https://github.com/metachris/logzero
Author: Chris Hager
Author-email: chris@linuxuser.at
License: MIT license
Description: # logzero

[](https://logzero.readthedocs.io/en/latest/?badge=latest)
[](https://pypi.python.org/pypi/logzero)
[](https://anaconda.org/conda-forge/logzero)
[](https://pepy.tech/project/logzero)
Robust and effective logging for Python 2 and 3.

* Documentation: https://logzero.readthedocs.io
* GitHub: https://github.com/metachris/logzero
Features
--------
* Easy logging to console and/or (rotating) file.
* Provides a fully configured standard [Python logger object](https://docs.python.org/2/library/logging.html#module-level-functions>).
* JSON logging (with integrated [python-json-logger](https://github.com/madzak/python-json-logger))
* Pretty formatting, including level-specific colors in the console.
* No dependencies
* Windows color output supported by [colorama](https://github.com/tartley/colorama)
* 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 and processes).
* Global default logger with [logzero.logger](https://logzero.readthedocs.io/en/latest/#i-logzero-logger) and custom loggers with [logzero.setup_logger(..)](https://logzero.readthedocs.io/en/latest/#i-logzero-setup-logger).
* Compatible with Python 2 and 3.
* All contained in a [single file](https://github.com/metachris/logzero/blob/master/logzero/__init__.py).
* Licensed under the MIT license.
* Heavily inspired by the [Tornado web framework](https://github.com/tornadoweb/tornado).
Installation:
```shell
python -m pip install logzero
```
Example Usage
-------------
```python
from logzero import logger
logger.debug("hello")
logger.info("info")
logger.warning("warn")
logger.error("error")
# This is how you'd log an exception
try:
raise Exception("this is a demo exception")
except Exception as e:
logger.exception(e)
# JSON logging
import logzero
logzero.json()
logger.info("JSON test")
# Start writing into a logfile
logzero.logfile("/tmp/logzero-demo.log")
# Set a minimum loglevel
logzero.loglevel(logzero.WARNING)
```
This is the output:

Note: You can find more examples in the documentation: https://logzero.readthedocs.io
### JSON logging
JSON logging can be enabled for the default logger with `logzero.json()`, or with `setup_logger(json=True)` for custom loggers:
```python
>>> logzero.json()
>>> logger.info("test")
{"asctime": "2020-10-21 10:42:45,808", "filename": "", "funcName": "", "levelname": "INFO", "levelno": 20, "lineno": 1, "module": "", "message": "test", "name": "logzero_default", "pathname": "", "process": 76179, "processName": "MainProcess", "threadName": "MainThread"}
>>> my_logger = setup_logger(json=True)
>>> my_logger.info("test")
{"asctime": "2020-10-21 10:42:45,808", "filename": "", "funcName": "", "levelname": "INFO", "levelno": 20, "lineno": 1, "module": "", "message": "test", "name": "logzero_default", "pathname": "", "process": 76179, "processName": "MainProcess", "threadName": "MainThread"}
```
The logged JSON object has these fields:
```json
{
"asctime": "2020-10-21 10:43:40,765",
"filename": "test.py",
"funcName": "test_this",
"levelname": "INFO",
"levelno": 20,
"lineno": 9,
"module": "test",
"message": "info",
"name": "logzero",
"pathname": "_tests/test.py",
"process": 76204,
"processName": "MainProcess",
"threadName": "MainThread"
}
```
Exceptions logged with `logger.exception(e)` have these additional JSON fields:
```json
{
"levelname": "ERROR",
"levelno": 40,
"message": "this is a demo exception",
"exc_info": "Traceback (most recent call last):\n File \"_tests/test.py\", line 15, in test_this\n raise Exception(\"this is a demo exception\")\nException: this is a demo exception"
}
```
Take a look at the documentation for more information and examples:
* Documentation: https://logzero.readthedocs.io.
Installation
------------
Install `logzero` with [pip](https://pip.pypa.io):
```shell
python -m pip install logzero
```
Here's how you setup a virtualenv and download and run the demo:
```shell
# Create and activate a virtualenv in ./venv/
python3 -m venv venv
. venv/bin/activate
# Install logzero
python -m pip install logzero
# Download and run demo.py
wget https://raw.githubusercontent.com/metachris/logzero/master/examples/demo.py
python demo.py
```
If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide
you through the process.
Alternatively, if you use the [Anaconda distribution](https://www.anaconda.com/download/):
```shell
$ conda config --add channels conda-forge
$ conda install logzero
```
You can also install `logzero` from the public [Github repo](https://github.com/metachris/logzero):
```shell
$ git clone https://github.com/metachris/logzero.git
$ cd logzero
$ python setup.py install
```
Contributors
------------
* [Chris Hager](https://github.com/metachris)
* [carlodr](https://github.com/carlodri)
* [Brian Lenz](https://github.com/brianlenz)
* [David Martin](https://github.com/dmartin35)
* [Zakaria Zajac](madzak) (creator of [python-json-logger](https://github.com/madzak/python-json-logger))
---
Development
-----------
**Getting started**
```shell
$ git clone https://github.com/metachris/logzero.git
$ cd logzero
# Activate virtualenv
$ python3 -m venv venv
$ . venv/bin/activate
# Install main and dev dependencies
$ pip install -e .
$ pip install -r requirements_dev.txt
# Run the tests
$ make test
# Run the linter
$ make lint
# Generate the docs (will auto-open in Chrome)
$ make docs
# You can enable watching mode to automatically rebuild on changes:
$ make servedocs
```
To test with Python 2.7, you can use Docker:
```shell
docker run --rm -it -v /Users/chris/stream/logzero:/mnt python:2.7 /bin/bash
```
Now you have a shell with the current directory mounted into `/mnt/` inside the container.
**Notes**
* [pytest](https://docs.pytest.org/en/latest/) is the test runner
* CI is run with [Github actions](https://github.com/metachris/logzero/tree/master/.github/workflows).
* Download stats: https://pepy.tech/project/logzero
---
Changelog
---------
See the changelog here: https://github.com/metachris/logzero/blob/master/HISTORY.md
Feedback
--------
All kinds of feedback and contributions are welcome.
* [Create an issue](https://github.com/metachris/logzero/issues/new)
* Create a pull request
* [@metachris](https://twitter.com/metachris)

History
=======
1.6.5 (2021-03-17)
------------------
- Export loglevels directly (you can use eg. `logzero.DEBUG` instead of `logging.DEBUG`)
- `setup_default_logger` use `backupCount`
- Update dependencies
- PRs: (386)[https://github.com/metachris/logzero/pull/386]
1.6.3 (2020-11-15)
------------------
- JSON logging with UTF-8 enabled by default ([PR 357](https://github.com/metachris/logzero/pull/357))
1.6.0 (1.6.2) (2020-10-29)
--------------------------
- JSON logging support ([PR 344][])
- Ability to easily change colors ([\#82][])
- Allow creating a root logger ([\#342][])
- Bugfix: file logging with lower loglevel than stream ([PR 338][])
- Running tests with Python up to 3.9
- Dependency updates
1.5.0 (2018-03-07)
------------------
- `logzero.syslog(..)` ([PR 83][])
1.4.0 (2018-03-02)
------------------
- Allow Disabling stderr Output ([PR 83][1])
1.3.0 (2017-07-19)
------------------
- Color output now works in Windows (supported by colorama)
1.2.1 (2017-07-09)
------------------
- Logfiles with custom loglevels (eg. stream handler with DEBUG and
file handler with ERROR).
1.2.0 (2017-07-05)
------------------
- Way better API for configuring the default logger with logzero.loglevel(..), logzero.logfile(..), etc.
- Built-in rotating logfile support.
``` python
import logging
import logzero
from logzero import logger
# This log message goes to the console
logger.debug("hello")
# Set a minimum log level
logzero.loglevel(logging.INFO)
# Set a logfile (all future log messages are also saved there)
logzero.logfile("/tmp/logfile.log")
# Set a rotating logfile (replaces the previous logfile handler)
logzero.logfile("/tmp/rotating-logfile.log", maxBytes=1000000, backupCount=3)
# Disable logging to a file
logzero.logfile(None)
# Set a custom formatter
formatter = logging.Formatter('%(name)s - %(asctime)-15s - %(levelname)s: %(message)s');
logzero.formatter(formatter)
# Log some variables
logger.info("var1: %s, var2: %s", var1, var2)
```
1.1.2 (2017-07-04)
------------------
- Better reconfiguration of handlers, doesn't remove custom handlers
anymore
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.
[PR 344]: https://github.com/metachris/logzero/pull/344
[\#82]: https://github.com/metachris/logzero/issues/82
[\#342]: https://github.com/metachris/logzero/pull/342
[PR 338]: https://github.com/metachris/logzero/pull/338
[PR 83]: https://github.com/metachris/logzero/pull/84
[1]: https://github.com/metachris/logzero/pull/83
Keywords: logzero
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/README.md 0000644 0001751 0000171 00000016155 00000000000 014027 0 ustar 00runner docker # logzero

[](https://logzero.readthedocs.io/en/latest/?badge=latest)
[](https://pypi.python.org/pypi/logzero)
[](https://anaconda.org/conda-forge/logzero)
[](https://pepy.tech/project/logzero)
Robust and effective logging for Python 2 and 3.

* Documentation: https://logzero.readthedocs.io
* GitHub: https://github.com/metachris/logzero
Features
--------
* Easy logging to console and/or (rotating) file.
* Provides a fully configured standard [Python logger object](https://docs.python.org/2/library/logging.html#module-level-functions>).
* JSON logging (with integrated [python-json-logger](https://github.com/madzak/python-json-logger))
* Pretty formatting, including level-specific colors in the console.
* No dependencies
* Windows color output supported by [colorama](https://github.com/tartley/colorama)
* 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 and processes).
* Global default logger with [logzero.logger](https://logzero.readthedocs.io/en/latest/#i-logzero-logger) and custom loggers with [logzero.setup_logger(..)](https://logzero.readthedocs.io/en/latest/#i-logzero-setup-logger).
* Compatible with Python 2 and 3.
* All contained in a [single file](https://github.com/metachris/logzero/blob/master/logzero/__init__.py).
* Licensed under the MIT license.
* Heavily inspired by the [Tornado web framework](https://github.com/tornadoweb/tornado).
Installation:
```shell
python -m pip install logzero
```
Example Usage
-------------
```python
from logzero import logger
logger.debug("hello")
logger.info("info")
logger.warning("warn")
logger.error("error")
# This is how you'd log an exception
try:
raise Exception("this is a demo exception")
except Exception as e:
logger.exception(e)
# JSON logging
import logzero
logzero.json()
logger.info("JSON test")
# Start writing into a logfile
logzero.logfile("/tmp/logzero-demo.log")
# Set a minimum loglevel
logzero.loglevel(logzero.WARNING)
```
This is the output:

Note: You can find more examples in the documentation: https://logzero.readthedocs.io
### JSON logging
JSON logging can be enabled for the default logger with `logzero.json()`, or with `setup_logger(json=True)` for custom loggers:
```python
>>> logzero.json()
>>> logger.info("test")
{"asctime": "2020-10-21 10:42:45,808", "filename": "", "funcName": "", "levelname": "INFO", "levelno": 20, "lineno": 1, "module": "", "message": "test", "name": "logzero_default", "pathname": "", "process": 76179, "processName": "MainProcess", "threadName": "MainThread"}
>>> my_logger = setup_logger(json=True)
>>> my_logger.info("test")
{"asctime": "2020-10-21 10:42:45,808", "filename": "", "funcName": "", "levelname": "INFO", "levelno": 20, "lineno": 1, "module": "", "message": "test", "name": "logzero_default", "pathname": "", "process": 76179, "processName": "MainProcess", "threadName": "MainThread"}
```
The logged JSON object has these fields:
```json
{
"asctime": "2020-10-21 10:43:40,765",
"filename": "test.py",
"funcName": "test_this",
"levelname": "INFO",
"levelno": 20,
"lineno": 9,
"module": "test",
"message": "info",
"name": "logzero",
"pathname": "_tests/test.py",
"process": 76204,
"processName": "MainProcess",
"threadName": "MainThread"
}
```
Exceptions logged with `logger.exception(e)` have these additional JSON fields:
```json
{
"levelname": "ERROR",
"levelno": 40,
"message": "this is a demo exception",
"exc_info": "Traceback (most recent call last):\n File \"_tests/test.py\", line 15, in test_this\n raise Exception(\"this is a demo exception\")\nException: this is a demo exception"
}
```
Take a look at the documentation for more information and examples:
* Documentation: https://logzero.readthedocs.io.
Installation
------------
Install `logzero` with [pip](https://pip.pypa.io):
```shell
python -m pip install logzero
```
Here's how you setup a virtualenv and download and run the demo:
```shell
# Create and activate a virtualenv in ./venv/
python3 -m venv venv
. venv/bin/activate
# Install logzero
python -m pip install logzero
# Download and run demo.py
wget https://raw.githubusercontent.com/metachris/logzero/master/examples/demo.py
python demo.py
```
If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide
you through the process.
Alternatively, if you use the [Anaconda distribution](https://www.anaconda.com/download/):
```shell
$ conda config --add channels conda-forge
$ conda install logzero
```
You can also install `logzero` from the public [Github repo](https://github.com/metachris/logzero):
```shell
$ git clone https://github.com/metachris/logzero.git
$ cd logzero
$ python setup.py install
```
Contributors
------------
* [Chris Hager](https://github.com/metachris)
* [carlodr](https://github.com/carlodri)
* [Brian Lenz](https://github.com/brianlenz)
* [David Martin](https://github.com/dmartin35)
* [Zakaria Zajac](madzak) (creator of [python-json-logger](https://github.com/madzak/python-json-logger))
---
Development
-----------
**Getting started**
```shell
$ git clone https://github.com/metachris/logzero.git
$ cd logzero
# Activate virtualenv
$ python3 -m venv venv
$ . venv/bin/activate
# Install main and dev dependencies
$ pip install -e .
$ pip install -r requirements_dev.txt
# Run the tests
$ make test
# Run the linter
$ make lint
# Generate the docs (will auto-open in Chrome)
$ make docs
# You can enable watching mode to automatically rebuild on changes:
$ make servedocs
```
To test with Python 2.7, you can use Docker:
```shell
docker run --rm -it -v /Users/chris/stream/logzero:/mnt python:2.7 /bin/bash
```
Now you have a shell with the current directory mounted into `/mnt/` inside the container.
**Notes**
* [pytest](https://docs.pytest.org/en/latest/) is the test runner
* CI is run with [Github actions](https://github.com/metachris/logzero/tree/master/.github/workflows).
* Download stats: https://pepy.tech/project/logzero
---
Changelog
---------
See the changelog here: https://github.com/metachris/logzero/blob/master/HISTORY.md
Feedback
--------
All kinds of feedback and contributions are welcome.
* [Create an issue](https://github.com/metachris/logzero/issues/new)
* Create a pull request
* [@metachris](https://twitter.com/metachris)

././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 010212 x ustar 00 28 mtime=1615980257.5096693
logzero-1.7.0/docs/ 0000755 0001751 0000171 00000000000 00000000000 013470 5 ustar 00runner docker ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/docs/Makefile 0000644 0001751 0000171 00000015156 00000000000 015140 0 ustar 00runner docker # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/logzero.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/logzero.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/logzero"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/logzero"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 010212 x ustar 00 28 mtime=1615980257.5136695
logzero-1.7.0/docs/_static/ 0000755 0001751 0000171 00000000000 00000000000 015116 5 ustar 00runner docker ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1615980253.0
logzero-1.7.0/docs/_static/demo-output-json.png 0000644 0001751 0000171 00000107160 00000000000 021062 0 ustar 00runner docker PNG
IHDR p 7IDATx?k1a̘F1șGJ )u412ґCPKϷs:÷x>^6{\Z?]k{CQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQak-cЦ=Z_4DC:
eᦛѯ?A o~)zވm8,>Θ$$n@}Ӿ=Di%Lz7jolٲ"DG.]hݺܯ((JWu\s=2Q{>MorW S{{\GFϨzGOnFbvVBR|,=3{}B@r/-M쭬UٰdMgN1o>j*O?
2ѻwM6}|_/+(RBȣamOo+7^1hÄN,}hHl3'
"%dzJgtd(0Xr/nC8̃
[|'bk+.}:qEQEͅxv\Ffcߘ_ 2zmۄHPpy%y來Mvlē b>qfwXa!0+Wa=:; 68aM8?{^V/,CD/#F?#GXbի<1ӦMۿW_}f͚,NBnݺ/Ë/nܸ1EQEQb>r3
J;yq=MIfj۳uM@|yU<Z瘄fdgy 旹MzW
ѶMe|ΡO]yyS^aO>5!PݲZ9寮͖mX"'OR1sLvVVVnܸ
:e299uV+(Bٶ=NlFRn_++ ļ6Ⱦ:b$Rŷcc6mf/ >?;>X
nJ%