Library in Python to store logs in MongoDB and send notifications of errors to Microsoft Teams
Project description
LOGZE
Library in Python to store logs in MongoDB and send notifications of errors to MS Teams.
Install
Install logze using PyPI or directly via pip:
pip install logze
Usage
from logze.recorder.logger import LogRecorder
from logze.models.log import Log
recorder = LogRecorder("{YOUR_CONN_STRING}", "{DB_NAME}", "{COLLECTION_NAME}", "{MS_TEAMS_WEBHOOK}")
log = Log("{SOURCE}", "{LOG_TYPE}", "{MESSAGE}", "{EVENT}")
recorder.record_log(log)
Running unit tests
$ export MONGO_URI="mongodb://user:password@host:port/?authMechanism=DEFAULT"
$ export DB_NAME="YOUR_DB_NAME"
$ python -m unittest discover tests
...
------------------------------------------------------------------------------
Ran 3 tests in 0.144s
OK
Author
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
logze-0.1.8.tar.gz
(3.7 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
logze-0.1.8-py3-none-any.whl
(4.4 kB
view details)
File details
Details for the file logze-0.1.8.tar.gz.
File metadata
- Download URL: logze-0.1.8.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbb38ced2177826e38629e38d925fa1a98d0a8e67ff1db63930becc5331562b
|
|
| MD5 |
79539fe626856dcf6e26f802ed52d79a
|
|
| BLAKE2b-256 |
e1f498de2e6a49d2de3bff889b420d92765ed98e211147340d338ef235a8e735
|
File details
Details for the file logze-0.1.8-py3-none-any.whl.
File metadata
- Download URL: logze-0.1.8-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8083d8671c40e7dcf361f91b7f3c57fab9572a35995c47881881615b7d6427
|
|
| MD5 |
012a0c2510ac6d993803f4df3f1912df
|
|
| BLAKE2b-256 |
92e7753b1db73704e8f4749ec589010ab4817a7a1889b206f044a9019f65f3fb
|