# LogCaptureError: cannot use capsys and caplog at the same time

- **ID:** `python/pytest-capture-log-error`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在同一个测试函数中同时请求了 capsys 和 caplog fixture，pytest 不支持

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.4.0 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   def test_foo(caplog): ... 使用 caplog.text 检查日志
   ```
2. **** (85% success)
   ```
   def test_foo(capsys): ... 使用 capsys.readouterr()
   ```

## Dead Ends

- **** — 可能失去需要的功能 (50% fail)
- **** — capsys 捕获 stdout，不捕获日志 (70% fail)
