{"categories":[{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"}],"enrichment":{"capability":"A flake8 extension that enforces logging best practices by detecting and preventing format strings, concatenation, and other anti-patterns in Python logging calls.","skillfed_tags":["logging","code-quality","flake8-plugin"],"use_cases":["Enforce consistent logging patterns across a codebase to prevent accidental data leakage in production logs.","Validate that logging calls use the `extra` dictionary instead of string formatting for dynamic values.","Whitelist allowed field names in logging `extra` dictionaries to catch typos or unauthorized keys.","Detect and flag improper exception logging (e.g., using `error(..., exc_info=True)` instead of `exception()`).","Prevent use of deprecated `warn()` method in favor of the standard `warning()` method."],"what_it_does":"This is a flake8 plugin that enforces a specific logging discipline: it detects when Python logging calls use format strings, concatenation, f-strings, or other string-building techniques instead of passing non-constant data through the logging `extra` dictionary. The plugin checks for violations like `.format()`, `%` formatting, `+` concatenation, and f-strings in log messages, and can optionally enforce that `extra` keys come from a whitelisted set to prevent accidental exposure of sensitive data in logs.\n\nThe package is designed for teams that want to separate log message templates (constants) from dynamic data (passed via `extra`), reducing the risk of sensitive information leaking into logs through careless string construction. It supports plugin-based whitelisting via entry points and has special handling for debug-level logs and debug-prefixed keys. No runtime dependencies are required; it integrates directly into flake8's linting workflow.","worth_installing":"Yes. This is a lightweight, actively maintained flake8 extension with no dependencies, permissive licensing, and a clear, focused purpose. Install it if your team wants to enforce structured logging discipline and reduce the risk of sensitive data leaking through log statements. The violation codes are disabled by default, so you can adopt it incrementally by enabling only the rules that match your logging policy."},"id":"flake8-logging-format","links":{"html":"https://skillfed.io/packages/flake8-logging-format","md":"https://skillfed.io/packages/flake8-logging-format.md","pypi":"https://pypi.org/project/flake8-logging-format/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-06-11","license_spdx":null,"license_treatment":"permissive","name":"flake8-logging-format","python_support":"unspecified","summary":null},"popularity":{"monthly_downloads":368055,"position":7191,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2024.24.12"}
