Remote Logger
Installation
pip install remote-logger
Examples
Initializing RemoteLogger with Sentry
import logging
from remote_logger.clients.sentry_logger_client import SentryLoggerClient
from remote_logger.remote_logger_handler import RemoteLoggerHandler
LOGGER = logging.getLogger(__name__)
dsn = "https://<key>@sentry.io/<project>"
sentry_client = SentryLoggerClient(dsn=dsn)
sentry_handler = RemoteLoggerHandler(client=sentry_client)
sentry_handler.setLevel(logging.ERROR)
LOGGER.addHandler(sentry_handler)
Initializing RemoteLogger with Stackdriver
import logging
from remote_logger.clients.stackdriver_logger_client import StackdriverLoggerClient
from remote_logger.remote_logger_handler import RemoteLoggerHandler
LOGGER = logging.getLogger(__name__)
# With service key
service_key_path = "/path/to/key.json"
stackdriver_client = StackdriverLoggerClient(service_key_path=service_key_path)
# Without service key
stackdriver_client = StackdriverLoggerClient()
stackdriver_handler = RemoteLoggerHandler(stackdriver_client)
stackdriver_handler.setLevel(logging.ERROR)
LOGGER.addHandler(stackdriver_handler)
Sending events to RemoteLogger
dummy_group_id = 99
primary_metadata = {
"pkey1": "pvalue1",
"pkey2": "pvalue2",
"pkey3": "pvalue3",
}
secondary_metadata = {
"skey1": "svalue1",
"skey2": "svalue2",
"skey3": "svalue3",
}
LOGGER.error("Test Message", extra={
"group_id": dummy_group_id,
"primary_metadata": primary_metadata,
"secondary_metadata": secondary_metadata,
})
Metadata
Release files for remote-logger 0.3.1
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 |
|---|---|---|---|---|
| remote-logger-0.3.1.tar.gz | 4.8 kB | Without provenance | Details for remote-logger-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| remote_logger-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for remote_logger-0.3.1-py3-none-any.whl |
Total release size: 23.4 kB
Release files / remote-logger-0.3.1.tar.gz
| Download URL | remote-logger-0.3.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
179f1f9bcc1e22f5260da175103bf04be732b4a3a188fc0c424cae34a39320e8
|
|
BLAKE2b-256 checksum How to use checksums |
646b0075d00d11aa985f669a725f8b2bf9210f883182db18976360a1bb3544a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8
|
Release files / remote_logger-0.3.1-py3-none-any.whl
| Download URL | remote_logger-0.3.1-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
094d352ee1cb61e09139deebaf25b422962f2b78e4efd9bdf998081adc95607f
|
|
BLAKE2b-256 checksum How to use checksums |
7cd6a51c4edd318daf5a872b35a65ed4daa04785e72b06a1ef3634d29ef4493c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8
|
Security for remote-logger 0.3.1
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.