# assert 0 == 1
E   AssertionError: expected 1 log record, got 0
E   assert 0 == 1
E    +  where 0 = len(caplog.records)

- **ID:** `python/pytest-caplog-empty-no-propagate`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The application logger has propagate=False, or caplog's level is not set to the level of the emitted records, so records never reach the root handler that caplog attaches to.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   def test_logs(caplog):
    caplog.set_level(logging.INFO, logger='myapp')
    import logging
    logging.getLogger('myapp').propagate = True
    my_function()
    assert 'started' in caplog.text
   ```
2. **** (92% success)
   ```
   def test_logs(caplog):
    with caplog.at_level(logging.INFO, logger='myapp'):
        my_function()
    assert any('started' in r.message for r in caplog.records)
   ```

## Dead Ends

- **** — Clearing does not help when records never propagate to caplog in the first place. (80% fail)
- **** — Same propagation issue; caplog.text is also empty. (85% fail)
