Skip to content

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

Closed
@LanceaKing

Description

@LanceaKing

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: ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions