[flake8-logging] Suggest .getLogger(__name__) instead of .getLogger(__file__) (LOG015) (#14392)

This commit is contained in:
InSync 2024-11-17 15:22:52 +07:00 committed by GitHub
parent d470f29093
commit cab7caf80b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ use crate::checkers::ast::Checker;
/// ```python
/// import logging
///
/// logger = logging.getLogger(__file__)
/// logger = logging.getLogger(__name__)
/// logger.info("Foobar")
/// ```
#[violation]