This release is a pre-release and may not be stable for production use.
aidbox-logging-py
Aidbox $loggy python logging handler with queue
Installation
Install from pypi as aidbox-logging
Usage
from aidbox_logging import init_queued_aidbox_loggy_handler, enable_excepthook_logging
logging.basicConfig(
format="[%(asctime)s] [%(process)d] [%(levelname)s] %(name)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S %z",
)
root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG)
if env_config.loggy_url:
loggy_handler = init_queued_aidbox_loggy_handler(
env_config.loggy_url,
app="lab-backend",
version=f"{version.__version__}-{version.__build_commit_hash__}",
meta={
"env": env_config.lab_room_id,
},
)
# By default all log messages will be handled by loggy
root_logger.addHandler(loggy_handler)
# By default gunicorn errors are not propagated, so we handle it explicitly
logging.getLogger("gunicorn.error").addHandler(loggy_handler)
# Optional: enable excepthook logging that intercepts all exceptions inside threads
enable_excepthook_logging()
Metadata
Release files for aidbox-logging 0.1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aidbox_logging-0.1.0b1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aidbox_logging-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / aidbox_logging-0.1.0b1.tar.gz
| Download URL | aidbox_logging-0.1.0b1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90a4d131f05301bf51aac764c3329cda314913cfb11c26d7db786f6dab9a2c8b
|
|
BLAKE2b-256 checksum How to use checksums |
5fb74b0d9c91988cebeae7f0784593d768b5911d8cdd3a41d053b32983e62263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2024.
Transparency logRelease files / aidbox_logging-0.1.0b1-py3-none-any.whl
| Download URL | aidbox_logging-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
332c7752f9e40cac2449e8b06faae1e28cbc4f11173a9f0f7e1ba846ca5689b8
|
|
BLAKE2b-256 checksum How to use checksums |
4112814d93576463a9f84694b2e006bcce8cac1bf04086db1627a83ef59e9ba0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2024.
Transparency log