# assert 0 == 1
 +  where 0 = len(caplog.records)

- **ID:** `python/pytest-caplog-empty-handler`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

caplog fixture captures logs at WARNING level by default; if the logger propagates=False or the log level is INFO, records are not captured.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   `caplog.set_level(logging.INFO, logger='mylogger')` and ensure `logging.getLogger('mylogger').propagate = True`
   ```
2. **** (85% success)
   ```
   with caplog.at_level(logging.INFO):
    myfunc()
assert 'expected' in caplog.text
   ```

## Dead Ends

- **** — If the logger has `propagate = False`, records never reach the root handler that caplog attaches to. (60% fail)
- **** — Loses structured logging and doesn't test the actual logging behavior. (80% fail)
