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.lognext to the database, pointed viaLog.set_path, done automatically byscidb.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
caplogcaptures everything regardless of sink levels.Log.*(...)with the default layer emits on logger"scidb", unchanged from the historical implementation. - MATLAB:
scimatlab's+scidb/Log.mdelegates to this class viapy.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.
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 scistacklog-0.1.26.tar.gz.
File metadata
- Download URL: scistacklog-0.1.26.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0504b1455b0db270dc43aa3a27dd4fa880b80e95aae95d4b81851dcb94639a3
|
|
| MD5 |
ee085ba792b9c92e3f0035615ca3042d
|
|
| BLAKE2b-256 |
01d5abc436cd96ee1b8a3a25427b8df1a8b83e77c1ddc5cf16cb75dd6b17731f
|
Provenance
The following attestation bundles were made for scistacklog-0.1.26.tar.gz:
Publisher:
publish.yml on mtillman14/scistack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scistacklog-0.1.26.tar.gz -
Subject digest:
a0504b1455b0db270dc43aa3a27dd4fa880b80e95aae95d4b81851dcb94639a3 - Sigstore transparency entry: 2818273373
- Sigstore integration time:
-
Permalink:
mtillman14/scistack@dceb1ef3ad83a0e46bca88afe94a2281e4e6dde6 -
Branch / Tag:
refs/tags/v0.1.27 - Owner: https://github.com/mtillman14
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dceb1ef3ad83a0e46bca88afe94a2281e4e6dde6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scistacklog-0.1.26-py3-none-any.whl.
File metadata
- Download URL: scistacklog-0.1.26-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a2d7d9d0e7a36641f870d7f275acf175a85c8426de6272d36195a1456c5b22f
|
|
| MD5 |
02e30d530dc09daf793a369e5e4a0fa7
|
|
| BLAKE2b-256 |
26a14f9fcb451ff29012225a07d1a86b897a0f1890ade82470a5016d9ccb4ff7
|
Provenance
The following attestation bundles were made for scistacklog-0.1.26-py3-none-any.whl:
Publisher:
publish.yml on mtillman14/scistack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scistacklog-0.1.26-py3-none-any.whl -
Subject digest:
4a2d7d9d0e7a36641f870d7f275acf175a85c8426de6272d36195a1456c5b22f - Sigstore transparency entry: 2818134101
- Sigstore integration time:
-
Permalink:
mtillman14/scistack@dceb1ef3ad83a0e46bca88afe94a2281e4e6dde6 -
Branch / Tag:
refs/tags/v0.1.26 - Owner: https://github.com/mtillman14
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dceb1ef3ad83a0e46bca88afe94a2281e4e6dde6 -
Trigger Event:
push
-
Statement type: