Skip to content

[Bug]: logging error after import this package #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LanceaKing opened this issue Feb 6, 2025 · 1 comment
Closed

[Bug]: logging error after import this package #20

LanceaKing opened this issue Feb 6, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@LanceaKing
Copy link
Contributor

TLS Requests version

v1.1.0

Issue description

i can't use built-in logging when using tls-requests:

ValueError: Formatting field not found in record: '_name'

this error is caused by the wrong _name field in the logging format:

FORMAT = "%(levelname)s:%(asctime)s:%(_name)s:%(funcName)s:%(lineno)d >>> %(message)s"

Steps to reproduce / Code Sample

>>> import tls_requests
>>> import logging
>>> logging.info("aaa")
...
ValueError: Formatting field not found in record: '_name'
Call stack:
  File "<stdin>", line 1, in <module>
Message: 'aaa'
Arguments: ()
@LanceaKing LanceaKing added the bug Something isn't working label Feb 6, 2025
LanceaKing added a commit to LanceaKing/tls-requests that referenced this issue Feb 6, 2025
@thewebscraping
Copy link
Owner

@LanceaKing
thanks u so much

thewebscraping added a commit that referenced this issue Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants