sysstra-logging
Shared structured (JSON-line) logging for Sysstra services. Stdlib-only —
zero install dependencies — so lean scripts (data-collection streamers,
cron jobs) can pick it up without pulling in the full sysstra SDK
(pandas/numpy/numba/redis/pymongo).
from sysstra_logging import get_logger, bind, clear_context
logger = get_logger("trading-strategies", log_file="logs/syss_sha_eios.jsonl")
bind(mode="lt", request_id=request_id, strategy="syss_sha_eios")
logger.info("order placed", extra={"order_id": order_id})
Set LOG_FORMAT=text for a human-readable formatter during local dev /
tail -f; the default is single-line JSON.
clear_context() must be called at the start of every unit of work (Celery
task, HTTP request) that reuses a process/thread — otherwise bound fields
from a previous task (most dangerously mode, paper vs. real-money) leak
into the next one's log lines.
See sysstra_logging/logging_utils.py for the full API
(bound(), get_context(), redirect_stdout_to(), ScrubFilter).
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 sysstra_logging-0.2.0.tar.gz.
File metadata
- Download URL: sysstra_logging-0.2.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f948fd40a2b9374ef43ab314ceb7672782a600c7efc44501c526af9a32de93d
|
|
| MD5 |
0a136ba619ed22a0a055bfa3c789752d
|
|
| BLAKE2b-256 |
cf9f79dc6ac33578530ebd610fcd2ef97941b957c483d253f4f0324e84551abd
|
File details
Details for the file sysstra_logging-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sysstra_logging-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
966ebe6add47fc624b12456781c410e7d99acaf868c405f62ffcb29ac06ea997
|
|
| MD5 |
a35b53e26d711ba0c4e150ec35e43320
|
|
| BLAKE2b-256 |
32b8ba786d6f0c342a5773a89734a318bf41d88b158123a2277434eb80b920d4
|