---
source: crates/ruff_linter/src/rules/flake8_logging/mod.rs
---
LOG004 [*] `.exception()` call outside exception handlers
  --> LOG004_0.py:13:1
   |
11 | ### Errors
12 |
13 | logging.exception("")
   | ^^^^^^^^^^^^^^^^^^^^^
14 | logger.exception("")
15 | exc("")
   |
help: Replace with `.error()`
   |
12 |
   - logging.exception("")
13 + logging.error("")
14 | logger.exception("")
   |
note: This is an unsafe fix and may change runtime behavior

LOG004 [*] `.exception()` call outside exception handlers
  --> LOG004_0.py:14:1
   |
13 | logging.exception("")
14 | logger.exception("")
   | ^^^^^^^^^^^^^^^^^^^^
15 | exc("")
   |
help: Replace with `.error()`
   |
13 | logging.exception("")
   - logger.exception("")
14 + logger.error("")
15 | exc("")
   |
note: This is an unsafe fix and may change runtime behavior

LOG004 `.exception()` call outside exception handlers
  --> LOG004_0.py:15:1
   |
13 | logging.exception("")
14 | logger.exception("")
15 | exc("")
   | ^^^^^^^
   |
help: Replace with `.error()`

LOG004 [*] `.exception()` call outside exception handlers
  --> LOG004_0.py:19:5
   |
18 | def _():
19 |     logging.exception("")
   |     ^^^^^^^^^^^^^^^^^^^^^
20 |     logger.exception("")
21 |     exc("")
   |
help: Replace with `.error()`
   |
18 | def _():
   -     logging.exception("")
19 +     logging.error("")
20 |     logger.exception("")
   |
note: This is an unsafe fix and may change runtime behavior

LOG004 [*] `.exception()` call outside exception handlers
  --> LOG004_0.py:20:5
   |
18 | def _():
19 |     logging.exception("")
20 |     logger.exception("")
   |     ^^^^^^^^^^^^^^^^^^^^
21 |     exc("")
   |
help: Replace with `.error()`
   |
19 |     logging.exception("")
   -     logger.exception("")
20 +     logger.error("")
21 |     exc("")
   |
note: This is an unsafe fix and may change runtime behavior

LOG004 `.exception()` call outside exception handlers
  --> LOG004_0.py:21:5
   |
19 |     logging.exception("")
20 |     logger.exception("")
21 |     exc("")
   |     ^^^^^^^
   |
help: Replace with `.error()`
