Remote Logger
Project description
Remote Logger
Installation
pip install remote-logger
Examples
from remote_logger.remote_logger_handler import RemoteLoggerHandler
from remote_logger.util.definitions import SENTRY
client_type = SENTRY
dummy_group_id = 99
dsn = https://<key>@sentry.io/<project>
sentry_handler = RemoteLoggerHandler(client_type,
dsn=dsn)
sentry_handler.setLevel(logging.ERROR)
LOGGER.addHandler(sentry_handler)
LOGGER.error("Test Message", extra={
"group_id": dummy_group_id,
"primary_metadata": {
"pkey1": "pvalue1",
"pkey2": "pvalue2",
"pkey3": "pvalue3",
},
"secondary_metadata": {
"skey1": "svalue1",
"skey2": "svalue2",
"skey3": "svalue3",
}
})
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
remote-logger-0.2.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for remote_logger-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a985ab52b196359a924569d53aefb2d3fa45a4c6e4e1872b0e51739afb9313f0 |
|
MD5 | 2844b4262785bed3c4752bc91d127071 |
|
BLAKE2b-256 | 827167e0cf3ff518bc89cb5c7c35ac1635efdf03bcb6cf4fa02a7a3ddf197009 |