Skip to main content
Incomplete provenance

1 of 2 files were uploaded without provenance metadata. View details.

scistacklog

The shared logging facade for every scistack layer. This is the lowest-level package in the stack — it has no dependencies, and every other layer (scifor, scidb, sciduckdb, …) emits through it or through a plain logging.getLogger("<layer>") child logger that it covers.

Design

One Log call, two destinations with independent levels:

  • console (stderr) — a concise pipeline narrative for the person running the pipeline. Time-only timestamps; level prefix only at WARN and above.

    14:32:06 [scifor] for_each(compute_psd) — 120 iterations: subject=12 values [s01,…,s12]
    14:33:15 [scifor] WARN: iteration failed: subject=s03, session=2 — ValueError: bad channel count
    
  • file (scidb.log next to the database, pointed via Log.set_path, done automatically by scidb.configure_database()) — the run document. One record per line: date + millisecond timestamp, level, originating layer.

    2026-07-07 14:32:06.001 INFO  [scifor] for_each(compute_psd) — 120 iterations: subject=12 values [s01,…,s12]
    2026-07-07 14:33:20.100 INFO  [scidb] [timing] save_batch(PSD): 114 items, 12 schemas, 0.412s
    

Both sinks default to INFO. DEBUG detail (per-iteration lines, timing phase tables, framework internals) is opt-in:

from scistacklog import Log

Log.set_level("DEBUG", sink="file")   # full detail in the file only
Log.set_level("DEBUG")                # both sinks

or set the SCIDB_LOG_LEVEL environment variable (applies to both sinks), or pass -v to the scidb CLI.

Usage

from scistacklog import Log

Log.info("for_each(compute_psd) — 120 iterations", layer="scifor")
Log.debug("combo detail: %s", combo, layer="scifor")
Log.error("save failed", layer="scidb", exc_info=True)

layer must be one of scistacklog.LAYERS (scidb, scifor, sciduck, scihist, scilineage, scistack, scistack_gui, matlab).

Timing a hot path

with Log.timer("save_batch(PSD)", extra="114 items") as t:
    with t.phase("canonical_hash"): ...
    with t.phase("commit"): ...

One INFO summary on exit — [timing] save_batch(PSD): 114 items, TOTAL=0.412s (canonical_hash=0.310s, commit=0.102s) — plus a per-phase table at DEBUG. TOTAL= appears on the summary line and nowhere else; MATLAB's timing archives grep for it.

live=True for anything that can run for minutes. A summary is a post-mortem, and an operation that has not finished yet has no post-mortem: a 25-minute figure save (scidb.log 2026-09-11) logged nothing at all, and a save that timed out logged nothing ever. A live timer announces each phase as it starts and as it ends, and enables t.note(...) for progress inside a long phase:

with Log.timer("save_figure", layer="scistack_gui", live=True) as t:
    with t.phase("resolve", extra="2 figure(s)"):
        t.note("figure %d/%d", 1, 2)
[timing] save_figure: resolve started — 2 figure(s)
[timing] save_figure: figure 1/2
[timing] save_figure: resolve done in 771.402s
[timing] save_figure: TOTAL=773.918s (resolve=771.402s, render_and_write=2.511s)

t.note is silent on a quiet timer, so the same instrumented code serves a fast path without flooding it.

Contracts

  • caplog: level filtering happens on the two handlers, never on the loggers — every record propagates to the root logger, so pytest's caplog captures everything regardless of sink levels. Log.*(...) with the default layer emits on logger "scidb", unchanged from the historical implementation.
  • MATLAB: scimatlab's +scidb/Log.m delegates to this class via py.scidb.log.Log.* (a re-export shim in scidb). The numeric level scale (DEBUG=0 … ERROR=3) and positional call shapes are frozen for that bridge.

Metadata

Release files for scistacklog 0.1.42

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Incomplete provenance

1 of 2 files were uploaded without provenance metadata.

We recommend further investigation before installing these files. View details.

Source distribution (sdist)

Source distribution for scistacklog 0.1.42
File Size Uploaded Provenance
scistacklog-0.1.42.tar.gz 9.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for scistacklog 0.1.42
File Interpreter ABI Platform
scistacklog-0.1.42-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 kB

Release files / scistacklog-0.1.42.tar.gz

Incomplete provenance

This file belongs to a release with incomplete provenance: while other files in this release have provenance metadata, this file does not.

We recommend further investigation before installing this file. View details.

Download URL scistacklog-0.1.42.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5d4ba66015307a1f16835f49f5f520a8cf159a4065499bf9b441254cd5ba8375
BLAKE2b-256 checksum
How to use checksums
14ea643768218cb9b92d820590485bf885f185f5a31c904b55f9e891d19fe199
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.11

Release files / scistacklog-0.1.42-py3-none-any.whl

Incomplete provenance

This file belongs to a release with incomplete provenance: while this file has provenance metadata, other files in this release do not.

We recommend further investigation before installing this file. View details.

Download URL scistacklog-0.1.42-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d713ac42883b297a02e8be2aaa706bcb5dfd2dac4f63a4e099b515b2da0b6ec
BLAKE2b-256 checksum
How to use checksums
b9edcfcaf06d4287fdb240d91a5215f891f372baec369d88e707d75f29074fdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Security for scistacklog 0.1.42

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.

Incomplete provenance

1 of 2 files were uploaded without provenance metadata.

Files with provenance 1 / 2
Files without provenance 1 / 2
Select from 2 files

Attestations for scistacklog-0.1.42.tar.gz

This file was uploaded without 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.

Release history Release notifications | RSS feed

This release
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