Skip to main content

Pylint plugin for checking usage of log.exception

Project description

Pylint plugin for finding logging calls inside exception handlers, and suggest they include exc_info=True, or change extra={'stack': True} to exc_info=True to get the stack from the exception instead of the one from the log statement.

Installation

$ pip install sentry_stack_checker

Usage

$ pylint --load-plugins sentry_stack_checker <module> -E -d all -e R9501
$ pylint --load-plugins sentry_stack_checker <module> -E -d all -e R9502

The option report-loggers can be provided to restrict the logging methods that are checked:

$ pylint --load-plugins sentry_stack_checker <module> --report-loggers=warning,error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sentry-stack-checker-0.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distributions

sentry_stack_checker-0.4-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2 Python 3

sentry_stack_checker-0.4-py2-none-any.whl (4.2 kB view details)

Uploaded Python 2

File details

Details for the file sentry-stack-checker-0.4.tar.gz.

File metadata

File hashes

Hashes for sentry-stack-checker-0.4.tar.gz
Algorithm Hash digest
SHA256 5d305b10a9cb83df031b6283713ac467bf4e0a5d790d33c4cdd39cb2f81a1c9f
MD5 29c05f0ca330fc6eb5c9890903a212f2
BLAKE2b-256 0f2a99d2a176ec2db2153823d151119454fba2454a6964757aa7c15791fdb7eb

See more details on using hashes here.

File details

Details for the file sentry_stack_checker-0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sentry_stack_checker-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9d713a5009766fcac3eba2dce197a03aa213ed6e1ac7f78e7758ef4e44c388ef
MD5 b679c79b7eea393f986018918780a2bf
BLAKE2b-256 705e4ea24183d1574413b04ecb89607cfbb36c40601fbaa261dbac9028fba336

See more details on using hashes here.

File details

Details for the file sentry_stack_checker-0.4-py2-none-any.whl.

File metadata

File hashes

Hashes for sentry_stack_checker-0.4-py2-none-any.whl
Algorithm Hash digest
SHA256 e7e02813ace4dfaa8fa0a3b06efbd4110ff8105b2baa7fe29133bf6106ead0fb
MD5 11825aa2ca0106417906b57aff1405c3
BLAKE2b-256 9ca1d13970189236c3f19679d8cb1d29d449e2e13039666d4ff6bcae85d8fd3e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page