Skip to content

Commit fe6d52f

Browse files
committed
clearer notebook
1 parent 1b3da0a commit fe6d52f

File tree

2 files changed

+58
-56
lines changed

2 files changed

+58
-56
lines changed

NOTES.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -596,15 +596,19 @@ enhancements to the vivarium framework would improve the researcher experience:
596596

597597
### 13.1 Configurable Logging Verbosity
598598

599-
**Problem**: Vivarium emits extensive INFO-level logging during `InteractiveContext`
600-
construction and each `sim.step()` call (component registration, pipeline building,
601-
population table updates, etc.). In notebook contexts, this floods the output and
602-
obscures analysis results. Currently requires `logging.getLogger().setLevel(logging.WARNING)`
603-
as a workaround, which silences ALL loggers globally.
599+
**Problem**: Vivarium uses **loguru** (not Python's standard `logging` module) for
600+
all its log output. This means `logging.getLogger().setLevel(logging.WARNING)` has
601+
no effect on vivarium's INFO spam during `InteractiveContext` construction and
602+
`sim.step()` calls. The correct workaround is:
603+
```python
604+
from loguru import logger
605+
logger.disable("vivarium")
606+
```
607+
But this is non-obvious and catches researchers off guard.
604608

605609
**Suggestion**: Add a `log_level` parameter to `InteractiveContext` (and/or a
606-
`vivarium.quiet_mode` configuration key) that sets vivarium's own loggers to the
607-
specified level without affecting other libraries. Something like:
610+
`vivarium.quiet_mode` configuration key) that configures loguru's level for vivarium
611+
loggers without requiring users to know about the loguru dependency:
608612
```python
609613
sim = InteractiveContext(spec_path, configuration={'vivarium': {'log_level': 'WARNING'}})
610614
```

tests/hr_degradation_analysis.ipynb

Lines changed: 47 additions & 49 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)