# AssertionError: assert 'expected log' in []

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

## Root Cause

The caplog fixture did not capture any log messages, often because the logging level is too high or the logger is not configured.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   caplog.set_level(logging.INFO)
Ensure the logger used in the code under test has propagate=True (default) and is not filtered.
   ```
2. **** (90% success)
   ```
   with caplog.at_level(logging.INFO):
    my_function()
assert 'expected log' in caplog.text
   ```

## Dead Ends

- **** — If the logger is not configured to propagate or the handler is missing, increasing the level may not help. (70% fail)
- **** — This does not test the logging behavior and is not a proper fix. (90% fail)
