---
source: crates/ruff_linter/src/rules/flake8_logging/mod.rs
---
LOG002 [*] Use `__name__` with `logging.getLogger()`
  --> LOG002.py:11:11
   |
10 | # LOG002
11 | getLogger(__file__)
   |           ^^^^^^^^
12 | logging.getLogger(name=__file__)
   |
help: Replace with `__name__`
   |
10 | # LOG002
   - getLogger(__file__)
11 + getLogger(__name__)
12 | logging.getLogger(name=__file__)
   |
note: This is an unsafe fix and may change runtime behavior

LOG002 [*] Use `__name__` with `logging.getLogger()`
  --> LOG002.py:12:24
   |
10 | # LOG002
11 | getLogger(__file__)
12 | logging.getLogger(name=__file__)
   |                        ^^^^^^^^
13 |
14 | logging.getLogger(__cached__)
   |
help: Replace with `__name__`
   |
11 | getLogger(__file__)
   - logging.getLogger(name=__file__)
12 + logging.getLogger(name=__name__)
13 |
   |
note: This is an unsafe fix and may change runtime behavior

LOG002 [*] Use `__name__` with `logging.getLogger()`
  --> LOG002.py:14:19
   |
12 | logging.getLogger(name=__file__)
13 |
14 | logging.getLogger(__cached__)
   |                   ^^^^^^^^^^
15 | getLogger(name=__cached__)
   |
help: Replace with `__name__`
   |
13 |
   - logging.getLogger(__cached__)
14 + logging.getLogger(__name__)
15 | getLogger(name=__cached__)
   |
note: This is an unsafe fix and may change runtime behavior

LOG002 [*] Use `__name__` with `logging.getLogger()`
  --> LOG002.py:15:16
   |
14 | logging.getLogger(__cached__)
15 | getLogger(name=__cached__)
   |                ^^^^^^^^^^
   |
help: Replace with `__name__`
   |
14 | logging.getLogger(__cached__)
   - getLogger(name=__cached__)
15 + getLogger(name=__name__)
16 |
   |
note: This is an unsafe fix and may change runtime behavior
