Skip to main content

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

sysstra_logging-0.2.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sysstra_logging-0.2.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

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

Hashes for sysstra_logging-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2f948fd40a2b9374ef43ab314ceb7672782a600c7efc44501c526af9a32de93d
MD5 0a136ba619ed22a0a055bfa3c789752d
BLAKE2b-256 cf9f79dc6ac33578530ebd610fcd2ef97941b957c483d253f4f0324e84551abd

See more details on using hashes here.

File details

Details for the file sysstra_logging-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sysstra_logging-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 966ebe6add47fc624b12456781c410e7d99acaf868c405f62ffcb29ac06ea997
MD5 a35b53e26d711ba0c4e150ec35e43320
BLAKE2b-256 32b8ba786d6f0c342a5773a89734a318bf41d88b158123a2277434eb80b920d4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page