koodaamo / tnefparse

a TNEF decoding library written in python, without external dependencies
GNU Lesser General Public License v3.0
49 stars 37 forks source link

Logging logger not registered when used as module #51

Closed vijaysar closed 4 years ago

vijaysar commented 5 years ago

Looks like the tnef.py when not using command line but used as a library has not initiated logging with logging.basicConfig() so when I import it and there is any issue the logger throws an output like No handlers could be found for logger "tnef-decode"

Recommended changes to init.py to initiate logging. It seems to happen only in cmline.py - useful only when using command line. It will be helpful for this to happen earlier so importing of tnefparse can work without this error!

Here is my recommend diff for init.py


* 1,4 ** --- 1,6 ---- import warnings

petri commented 4 years ago

Thanks. This should now be fixed so closing.