---
source: crates/ruff_linter/src/rules/flake8_logging_format/mod.rs
---
G010 [*] Logging statement uses `warn` instead of `warning`
 --> G010.py:6:9
  |
4 | from logging_setup import logger
5 |
6 | logging.warn("Hello World!")
  |         ^^^^
7 | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
8 | logger.warn("Hello world!")
  |
help: Convert to `warning`
  |
5 |
  - logging.warn("Hello World!")
6 + logging.warning("Hello World!")
7 | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
  |

G010 [*] Logging statement uses `warn` instead of `warning`
  --> G010.py:8:8
   |
 6 | logging.warn("Hello World!")
 7 | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
 8 | logger.warn("Hello world!")
   |        ^^^^
 9 |
10 | logging . warn("Hello World!")
   |
help: Convert to `warning`
  |
7 | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
  - logger.warn("Hello world!")
8 + logger.warning("Hello world!")
9 |
  |

G010 [*] Logging statement uses `warn` instead of `warning`
  --> G010.py:10:11
   |
 8 | logger.warn("Hello world!")
 9 |
10 | logging . warn("Hello World!")
   |           ^^^^
11 |
12 | from logging import warn, warning, exception
   |
help: Convert to `warning`
   |
9  |
   - logging . warn("Hello World!")
10 + logging . warning("Hello World!")
11 |
   |

G010 [*] Logging statement uses `warn` instead of `warning`
  --> G010.py:13:1
   |
12 | from logging import warn, warning, exception
13 | warn("foo")
   | ^^^^
14 | warning("foo")
15 | exception("foo")
   |
help: Convert to `warning`
   |
12 | from logging import warn, warning, exception
   - warn("foo")
13 | warning("foo")
14 + warning("foo")
15 | exception("foo")
   |
