Shared logging facade for the scistack framework (dual-sink console/file logging with layer tags)
Project description
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).
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.
Project details
Release history Release notifications | RSS feed
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.1.tar.gz.
File metadata
- Download URL: scistacklog-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f464ed138c0acff57b7e9259ddf83a8a34b8385fc264b55e2b80d400f0746ed
|
|
| MD5 |
aba3134f6ae8348de25fcc9b32bb50ea
|
|
| BLAKE2b-256 |
35b232a4085c353b56f111b3a2f6a107e67cdcd7ce255e3a61f40663dbefe93d
|
File details
Details for the file scistacklog-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scistacklog-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25cddf9381bab706ce465f9947ab75b1ca0f5221ebafaaabaf2e390f6243bbd1
|
|
| MD5 |
54ad80bea261a6789781dda91893618f
|
|
| BLAKE2b-256 |
9245dd4f0cfbfefa0909805bf0a9303cad803fd3942d6e84b3e917489fa60ead
|