khooihzhz / coingecko-python

This CoinGecko Python library provides convenient access to CoinGecko API.
MIT License
9 stars 1 forks source link

Your use of logging.info is incorrect #1

Open nzjrs opened 1 day ago

nzjrs commented 1 day ago

Using the root logger is bad practice and makes it impossible to cleanly filter out your log messages in a more complex application.

https://github.com/khooihzhz/coingecko-python/blob/2f189561aa7f5eab26e35e7bda0a796b1e23e92d/coingecko/api/base.py#L23

You should use a configured and namespaced logger like

logging.getLogger('coingecko-python').info('message')

khooihzhz commented 1 day ago

Thanks, will include this in the next version update!