Skip to content

How to turn off debug level in krakenex / requests module? #144

@kevinp2

Description

@kevinp2

Versions

OS:  MacOS Catalina
Python: 3.10.12
krakenex: 2.2.1

What are you trying to achieve?

My app uses the python logging library and has the debug level set to INFO. But all krakenex calls results in DEBUG messages being written to the log. This clutters up the log.

2024-04-13 13:16:18 -0700 INFO: Exchange: Kraken
2024-04-13 13:17:40 -0700 DEBUG: Starting new HTTPS connection (1): api.kraken.com:443
2024-04-13 13:17:41 -0700 DEBUG: https://api.kraken.com:443 "GET /0/public/Time HTTP/1.1" 200 None

What do you expect to happen?

Calls to krakenex should not result in debug messages being written to the log unless desired by the calling application.

I believe that krakenex calls the requests module and the debug level is set there or further deeper. It would be acceptable to figure out a way for my app to somehow set the log level in the requests module. Ideally, krakenex should itself have a way to set the loglevel for all its calls.

All suggestions are appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions