-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do NOT create logging.conf #162
Comments
I agree, sometimes logging.conf will conflict with existing code base logging config. What's more, whenever I run program that uses coapthon from different directory, it creates logging.conf all over the place. |
I fully agree: it is very bad form for a library to mess with the global logging structure. If you want to do logging in a specific manner for your library you should setup sub-loggers and apply any configuration changes there. I have spent 4 weeks (not fulltime, but still) debugging why some of my programs were suddenly giving all sorts of spurious log messages from all sort of modules. Turned out that it was because My program was using a package which was using another package which had started importing The only way I finally managed to find that CoAPthon was the culprit was when I had the brainwave to put a syntax error in the |
@Tanganelli is there any chance of progress on this issue? I'm using CoAPthon in a tool I distribute (not widely, but still:-), and all users of that tool end up with
I really dislike forking PyPi packages, because it's going to be an endless source of confusion to users of a package (besides it seems like I'd be taking credit for your work), but unless you can fix this in the foreseeable future I don't see another option... |
@jackjansen Alternative solution is to write code to delete "logging.conf" whenever program exits. |
There is this in
coap.py
:Libraries are NOT supposed to create configuration files. If there is no configuration file, you certainly shouldn't create one.
The text was updated successfully, but these errors were encountered: