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

ℹ Safe fix
3 3 | 
4 4 | from logging_setup import logger
5 5 | 
6   |-logging.warn("Hello World!")
  6 |+logging.warning("Hello World!")
7 7 | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
8 8 | logger.warn("Hello world!")
9 9 | 

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

ℹ Safe fix
5 5 | 
6 6 | logging.warn("Hello World!")
7 7 | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
8   |-logger.warn("Hello world!")
  8 |+logger.warning("Hello world!")
9 9 | 
10 10 | logging . warn("Hello World!")
11 11 | 

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

ℹ Safe fix
7  7  | log.warn("Hello world!")  # This shouldn't be considered as a logger candidate
8  8  | logger.warn("Hello world!")
9  9  | 
10    |-logging . warn("Hello World!")
   10 |+logging . warning("Hello World!")
11 11 | 
12 12 | from logging import warn, warning, exception
13 13 | warn("foo")

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

ℹ Safe fix
10 10 | logging . warn("Hello World!")
11 11 | 
12 12 | from logging import warn, warning, exception
13    |-warn("foo")
14 13 | warning("foo")
   14 |+warning("foo")
15 15 | exception("foo")
