Python logging dictionary configuration from yaml, json or Python dict
Project description
Python Tools for Setting up Logging
-----------------------------------
|Travis| |Appveoyr| |Codecov| |QuantifiedCode| |Pyup| |Gitter|
.. |Pyup| image:: https://pyup.io/repos/github/jaantollander/loggingtools/shield.svg
:target: https://pyup.io/repos/github/jaantollander/loggingtools/
:alt: Updates
.. |QuantifiedCode| image:: https://www.quantifiedcode.com/api/v1/project/2eae31e4b5ce4a96b01394a3337a9fde/badge.svg
:target: https://www.quantifiedcode.com/app/project/2eae31e4b5ce4a96b01394a3337a9fde
:alt: Code issues
.. |Travis| image:: https://travis-ci.org/jaantollander/loggingtools.svg?branch=master
:target: https://travis-ci.org/jaantollander/loggingtools
:alt: Travis continuous intergration
.. |Appveoyr| image:: https://ci.appveyor.com/api/projects/status/4ix406f1jpgj952t?svg=true
:target: https://ci.appveyor.com/project/jaantollander/loggingtools
:alt: Appveoyr continuous intergration
.. |Codecov| image:: https://codecov.io/gh/jaantollander/loggingtools/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jaantollander/loggingtools
:alt: Codecov coverage hosting
.. |Gitter| image:: https://badges.gitter.im/loggingtools/Lobby.svg
:alt: Join the chat at https://gitter.im/loggingtools/Lobby
:target: https://gitter.im/loggingtools/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. todo:: Command line client instruction
``setup_logging``
.. code-block:: python
import logging
from loggingtools import setup_logging
setup_logging('logging.yaml')
logger = logging.getLogger('<your_logger>')
...
``log_with``
.. code-block:: python
import logging
from loggingtools import setup_logging
... # setup your loggers
logger = logging.getLogger('<your_logger>')
@log_with(logger)
def function(arg, arg2):
...
Installation
------------
.. todo:: PyPI package
Currently can be installed through git
.. code-block:: bash
pip install git+https://github.com/jaantollander/loggingtools.git
References
----------
https://docs.python.org/3/library/logging.html
https://github.com/borntyping/python-colorlog
-----------------------------------
|Travis| |Appveoyr| |Codecov| |QuantifiedCode| |Pyup| |Gitter|
.. |Pyup| image:: https://pyup.io/repos/github/jaantollander/loggingtools/shield.svg
:target: https://pyup.io/repos/github/jaantollander/loggingtools/
:alt: Updates
.. |QuantifiedCode| image:: https://www.quantifiedcode.com/api/v1/project/2eae31e4b5ce4a96b01394a3337a9fde/badge.svg
:target: https://www.quantifiedcode.com/app/project/2eae31e4b5ce4a96b01394a3337a9fde
:alt: Code issues
.. |Travis| image:: https://travis-ci.org/jaantollander/loggingtools.svg?branch=master
:target: https://travis-ci.org/jaantollander/loggingtools
:alt: Travis continuous intergration
.. |Appveoyr| image:: https://ci.appveyor.com/api/projects/status/4ix406f1jpgj952t?svg=true
:target: https://ci.appveyor.com/project/jaantollander/loggingtools
:alt: Appveoyr continuous intergration
.. |Codecov| image:: https://codecov.io/gh/jaantollander/loggingtools/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jaantollander/loggingtools
:alt: Codecov coverage hosting
.. |Gitter| image:: https://badges.gitter.im/loggingtools/Lobby.svg
:alt: Join the chat at https://gitter.im/loggingtools/Lobby
:target: https://gitter.im/loggingtools/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. todo:: Command line client instruction
``setup_logging``
.. code-block:: python
import logging
from loggingtools import setup_logging
setup_logging('logging.yaml')
logger = logging.getLogger('<your_logger>')
...
``log_with``
.. code-block:: python
import logging
from loggingtools import setup_logging
... # setup your loggers
logger = logging.getLogger('<your_logger>')
@log_with(logger)
def function(arg, arg2):
...
Installation
------------
.. todo:: PyPI package
Currently can be installed through git
.. code-block:: bash
pip install git+https://github.com/jaantollander/loggingtools.git
References
----------
https://docs.python.org/3/library/logging.html
https://github.com/borntyping/python-colorlog
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
loggingtools-0.0.1.tar.gz
(27.0 kB
view hashes)
Built Distribution
Close
Hashes for loggingtools-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b0acebdd977074b99a00b15aaa50af050f0f0780b0adb11eb350c4620992560 |
|
MD5 | a5858e506b4a2f2e8fb0ca6a82eb6be5 |
|
BLAKE2b-256 | 8b72ffb74727b0a40eacf02158a54eb114a59718ba1e50fc5ef1473810560c22 |