Send python logs to RocketChat server.
Project description
rocketloghandler
Send your Python logs to RocketChat.
Implements a custom handler for the Python logging module.
For a full working example see rocketlog_test.py.
Using Logging in multiple modules
Ensure there is a hierarchical structure in the logger name separated by dots. The name is set when calling
logging.getLogger.
Usage example
import logging
from rocketloghandler.rocketloghandler import RocketLogHandler
rocketHandler = RocketLog(USER_ID, TOKEN, SERVER, CHANNEL_NAME, USER_ALIAS)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)
rocketHandler.setFormatter(formatter)
log.addHandler(rocketHandler)
log.warning("Never say no to the panda! Otherwise: https://www.youtube.com/watch?v=XYz3sl0LEA4")
Contributing
Feel free to contribute to this project. A contribution guide is available. Please add yourself to the list of contributors when you submit the pull request.
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
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
File details
Details for the file rocketloghandler-0.1.1.tar.gz.
File metadata
- Download URL: rocketloghandler-0.1.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da1f093380292c63b843d248c3b3e9bea0bd44fb7bd193b12c11da05c434a804
|
|
| MD5 |
f2b449539ee957fedbff1d647634ff94
|
|
| BLAKE2b-256 |
d1580856e6cd24398fcb8b10582ce2c54364dd4265cbff59ba4f8e9b7ee4e1ef
|
File details
Details for the file rocketloghandler-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rocketloghandler-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cf408d5be02b08d6f7654f4fa883786ed12610ebced721f7d208d257c8eeaa8
|
|
| MD5 |
185f650e78a2a2739744a8e8fba56325
|
|
| BLAKE2b-256 |
d4c923582551897b4fa2c754100eacfb0e4704d28a3cab5a5d8a47b4aedec913
|