A log package that works with MongoDB.
Project description
The idea behind this package is possibility to you use some client or something like the Metabase for collect and analyse logs of your application.
Its need two environments variables:
- MONGO_DB
- MONGO_URL
Its works with three collections:
- error
- info
- critical
Sample:
from mongo_system_log import *
log = LogThis(get_module_name())
log.info('error message', payload='payload', result='result')
log.error('error message', payload='payload', result='result')
log.critical('error message', payload='payload', result='result')
get_module_name()
- This function gets module and file name that called it. Must be called on instantiate the LogThis class.
The arguments payload and result has default value None.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mongo-system-log-0.1.1.tar.gz
.
File metadata
- Download URL: mongo-system-log-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46a46f39ebdf1d234fa56a997c56bdd69c33bcf7df82d149d865b1b3f3a8a34 |
|
MD5 | da70912283ed479b7776f664a7fc7905 |
|
BLAKE2b-256 | e0f7587a244dd54b36a3667415240634058aa33222f969898362d4a3dffabd29 |
File details
Details for the file mongo_system_log-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: mongo_system_log-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c1752f72e562d09b6d80dcbea18749b372dc10d5c454fed7ca71d3bfd8841d |
|
MD5 | d3deead61b70329e35754d92e73e2794 |
|
BLAKE2b-256 | 6a85ef05bc4bdf6e5281c597bda53e60df06f2ab6ec61006b5ce64b90ba28e89 |