Zyra provides a flexible logging system for both console output and file-based logs, designed to help users debug workflows and preserve reproducible run histories.
π Logging Overviewο
Uses Pythonβs standard
logging
module.Verbosity controlled by CLI flags (
-v/--verbose
,--quiet
).Supports logging to console and/or file(s).
Errors are logged with helpful context for reruns.
βοΈ CLI Optionsο
Flag |
Description |
---|---|
|
Enable debug-level logging (more details). |
|
Suppress most output (errors only). |
|
Write logs to the specified file. |
|
Write structured logs under a directory ( |
|
File write mode: |
π Verbosity Levelsο
Logging levels are tied to environment variables:
ZYRA_VERBOSITY
,DATAVIZHUB_VERBOSITY
Possible values:
debug
βlogging.DEBUG
info
βlogging.INFO
quiet
βlogging.ERROR
These are automatically set when you pass --verbose
or --quiet
to the CLI.
π₯οΈ Console Loggingο
By default, Zyra prints logs to the console using the selected verbosity level.
Examples:
zyra run pipeline.yaml --verbose
Will show debug logs for every stage.
zyra run pipeline.yaml --quiet
Will only display errors.
π File Loggingο
You can persist logs for reproducibility using:
zyra run pipeline.yaml --log-file run.log
Or use a log directory:
zyra run pipeline.yaml --log-dir ./logs/
This will generate workflow.log
(or stage-specific logs) inside the directory.
To overwrite instead of append:
zyra run pipeline.yaml --log-file run.log --log-file-mode overwrite
π¨ Error Loggingο
If a pipeline stage fails, Zyra logs:
The error message (
logging.error
)Contextual hints (e.g., rerun with
--verbose
)
Example output:
Stage 2 [process] failed with exit code 1.
Command: zyra convert-format --input file.csv --output file.nc
Hint: re-run with --verbose for details, or set ZYRA_VERBOSITY=debug.
β Summaryο
Console logging for interactive runs.
File logging for reproducibility and debugging.
Verbosity controlled by CLI flags and env vars.
Helpful error hints provided automatically.