loggers
loggers is a Python library that provides usefull wrapper methods for logging class. To be used as a superclass for your own classes.
Example
>>> from loggers import Loggers
>>>
>>> class spamClass(Loggers):
... def __init__(self, log_folder=None):
... super(spamClass, self).__init__('spamClass', log_folder_path=log_folder)
... def do_stuff(self, arg):
... if not type(arg) == str:
... self.log.error("I was expecting a string. :( ")
... else:
... self.log.debug("I received my string. :)")
...
>>> spam = spamClass('/tmp/logs/spamClass')
>>> spam.log.error('ERROR')
Log: ERROR | Log level:ERROR | Date:31/10/2016 16:51:47
>>> spam.set_log_rotate_handler(True)
>>> spam.do_stuff(123)
Log: I was expecting a string. :( | Log level:ERROR | Date:31/10/2016 16:51:47
>>> spam.do_stuff('Eggs')
>>> spam.set_log_level('DEBUG')
Log: Changing log level to DEBUG | Log level:DEBUG | Date:31/10/2016 16:51:47
>>> spam.do_stuff('Spam')
Log: I received my string. :) | Log level:DEBUG | Date:31/10/2016 16:51:47
Installation
To install loggers, simply run:
$ pip install loggers
loggers is compatible with Python 2.6+ and Python 3
Documentation
Source Code
Feel free to fork, evaluate and contribute to this project.
License
GPLv3 licensed.
Metadata
Release files for loggers 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| loggers-0.1.4.tar.gz | 3.9 kB | Without provenance | Details for loggers-0.1.4.tar.gz |
Release files / loggers-0.1.4.tar.gz
| Download URL | loggers-0.1.4.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88ce94790e6d71d38c70dc9132ea90277d76f65ca1be17b9b4ef87ef263c8165
|
|
BLAKE2b-256 checksum How to use checksums |
6138c74e9ac0314a7ffda7b94500651e88e16cb175b9dea6ff2686848718a637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.9.1 pkginfo/1.4.1 requests/2.10.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.13
|
Security for loggers 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.