chrisb2 / pi_ina219

This Python library supports the INA219 voltage, current and power monitor from Texas Instruments with a Raspberry Pi using the I2C bus. The intent of the library is to make it easy to use the quite complex functionality of this sensor.
MIT License
114 stars 34 forks source link

Logging update #20

Closed JennaSys closed 5 years ago

JennaSys commented 5 years ago

Setup of root logger using basicConfig() is now conditional on non-existence of any other handlers. Named module level logger is created and used instead of calls to root logger in ina219.py. These changes should allow it to play nicer with logging in modules where it is imported at.

Addition was also made to .gitignore for PyCharm (.idea) files.

It was tested with Python 2.7 and 3.7

chrisb2 commented 5 years ago

Thanks for this will give it a test at the weekend.

chrisb2 commented 5 years ago

All working well, thank you.

chrisb2 commented 5 years ago

I will publish to pypi shortly.