---
source: crates/ruff_linter/src/rules/flake8_logging_format/mod.rs
---
G001 Logging statement uses `str.format`
 --> G001.py:4:14
  |
2 | import logging as foo
3 |
4 | logging.info("Hello {}".format("World!"))
  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | logging.log(logging.INFO, "Hello {}".format("World!"))
6 | foo.info("Hello {}".format("World!"))
  |

G001 Logging statement uses `str.format`
 --> G001.py:5:27
  |
4 | logging.info("Hello {}".format("World!"))
5 | logging.log(logging.INFO, "Hello {}".format("World!"))
  |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | foo.info("Hello {}".format("World!"))
7 | logging.log(logging.INFO, msg="Hello {}".format("World!"))
  |

G001 Logging statement uses `str.format`
 --> G001.py:6:10
  |
4 | logging.info("Hello {}".format("World!"))
5 | logging.log(logging.INFO, "Hello {}".format("World!"))
6 | foo.info("Hello {}".format("World!"))
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | logging.log(logging.INFO, msg="Hello {}".format("World!"))
8 | logging.log(level=logging.INFO, msg="Hello {}".format("World!"))
  |

G001 Logging statement uses `str.format`
 --> G001.py:7:31
  |
5 | logging.log(logging.INFO, "Hello {}".format("World!"))
6 | foo.info("Hello {}".format("World!"))
7 | logging.log(logging.INFO, msg="Hello {}".format("World!"))
  |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
8 | logging.log(level=logging.INFO, msg="Hello {}".format("World!"))
9 | logging.log(msg="Hello {}".format("World!"), level=logging.INFO)
  |

G001 Logging statement uses `str.format`
 --> G001.py:8:37
  |
6 | foo.info("Hello {}".format("World!"))
7 | logging.log(logging.INFO, msg="Hello {}".format("World!"))
8 | logging.log(level=logging.INFO, msg="Hello {}".format("World!"))
  |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 | logging.log(msg="Hello {}".format("World!"), level=logging.INFO)
  |

G001 Logging statement uses `str.format`
  --> G001.py:9:17
   |
 7 | logging.log(logging.INFO, msg="Hello {}".format("World!"))
 8 | logging.log(level=logging.INFO, msg="Hello {}".format("World!"))
 9 | logging.log(msg="Hello {}".format("World!"), level=logging.INFO)
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |
11 | # Flask support
   |

G001 Logging statement uses `str.format`
  --> G001.py:16:31
   |
14 | from flask import current_app as app
15 |
16 | flask.current_app.logger.info("Hello {}".format("World!"))
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 | current_app.logger.info("Hello {}".format("World!"))
18 | app.logger.log(logging.INFO, "Hello {}".format("World!"))
   |

G001 Logging statement uses `str.format`
  --> G001.py:17:25
   |
16 | flask.current_app.logger.info("Hello {}".format("World!"))
17 | current_app.logger.info("Hello {}".format("World!"))
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 | app.logger.log(logging.INFO, "Hello {}".format("World!"))
   |

G001 Logging statement uses `str.format`
  --> G001.py:18:30
   |
16 | flask.current_app.logger.info("Hello {}".format("World!"))
17 | current_app.logger.info("Hello {}".format("World!"))
18 | app.logger.log(logging.INFO, "Hello {}".format("World!"))
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20 | from logging import info, log
   |

G001 Logging statement uses `str.format`
  --> G001.py:22:6
   |
20 | from logging import info, log
21 |
22 | info("Hello {}".format("World!"))
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 | log(logging.INFO, "Hello {}".format("World!"))
24 | info("Hello {}".format("World!"))
   |

G001 Logging statement uses `str.format`
  --> G001.py:23:19
   |
22 | info("Hello {}".format("World!"))
23 | log(logging.INFO, "Hello {}".format("World!"))
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 | info("Hello {}".format("World!"))
25 | log(logging.INFO, msg="Hello {}".format("World!"))
   |

G001 Logging statement uses `str.format`
  --> G001.py:24:6
   |
22 | info("Hello {}".format("World!"))
23 | log(logging.INFO, "Hello {}".format("World!"))
24 | info("Hello {}".format("World!"))
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | log(logging.INFO, msg="Hello {}".format("World!"))
26 | log(level=logging.INFO, msg="Hello {}".format("World!"))
   |

G001 Logging statement uses `str.format`
  --> G001.py:25:23
   |
23 | log(logging.INFO, "Hello {}".format("World!"))
24 | info("Hello {}".format("World!"))
25 | log(logging.INFO, msg="Hello {}".format("World!"))
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | log(level=logging.INFO, msg="Hello {}".format("World!"))
27 | log(msg="Hello {}".format("World!"), level=logging.INFO)
   |

G001 Logging statement uses `str.format`
  --> G001.py:26:29
   |
24 | info("Hello {}".format("World!"))
25 | log(logging.INFO, msg="Hello {}".format("World!"))
26 | log(level=logging.INFO, msg="Hello {}".format("World!"))
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | log(msg="Hello {}".format("World!"), level=logging.INFO)
   |

G001 Logging statement uses `str.format`
  --> G001.py:27:9
   |
25 | log(logging.INFO, msg="Hello {}".format("World!"))
26 | log(level=logging.INFO, msg="Hello {}".format("World!"))
27 | log(msg="Hello {}".format("World!"), level=logging.INFO)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
