Tanganelli / CoAPthon3

CoAPthon3 is a porting to python3 of my CoAPthon library. CoAPthon3 is a python3 library to the CoAP protocol compliant with the RFC. Branch is available for the Twisted framework.
MIT License
58 stars 50 forks source link

Coapthon log handling is not friendly to integration #9

Closed jackjansen closed 5 years ago

jackjansen commented 5 years ago

Coapthons way of using the Python logging module isn't great if you're integrating it into a larger package.

Importing any of the coapthon modules seems to override any logger settings, and not only for, say, logger coapthon.client.coap but also for the root logger and more.

In addition, a file "logging.conf" is always created in the current directory.

All of this wreaks havoc with my carefully setup logging structure, and there is no way I can event monkeypatch it (by overriding coapthon.utils.create_logging()) because the references to the logging.conf file are all over the place.

Tanganelli commented 5 years ago

Maybe you are right, feel free to perform any modification you like and then commit them.

Il giorno sab 10 nov 2018 alle ore 18:08 Jack Jansen < notifications@github.com> ha scritto:

Coapthons way of using the Python logging module isn't great if you're integrating it into a larger package.

Importing any of the coapthon modules seems to override any logger settings, and not only for, say, logger coapthon.client.coap but also for the root logger and more.

In addition, a file "logging.conf" is always created in the current directory.

All of this wreaks havoc with my carefully setup logging structure, and there is no way I can event monkeypatch it (by overriding coapthon.utils.create_logging()) because the references to the logging.conf file are all over the place.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Tanganelli/CoAPthon3/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AGb2-km2JfLf5ahBGaSpSyrFrOHc4eljks5utwgLgaJpZM4YYEvQ .

jackjansen commented 5 years ago

When I prepared for doing this I noticed that someone has already fixed this, 94aa766b8f seems to have all the fixes. So I guess my problem is really that there hasn't been a new release to PyPi with that fix. Can I ask that you do a new release?

Tanganelli commented 5 years ago

I have some ongoing work before the release, however you can easily install the github version with pip if this is the issue.

Il giorno lun 12 nov 2018 alle ore 13:21 Jack Jansen < notifications@github.com> ha scritto:

When I prepared for doing this I noticed that someone has already fixed this, 94aa766 https://github.com/Tanganelli/CoAPthon3/commit/94aa766b8f86cff259213b76e729a9bb2ecb5e4a seems to have all the fixes. So I guess my problem is really that there hasn't been a new release to PyPi with that fix. Can I ask that you do a new release?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tanganelli/CoAPthon3/issues/9#issuecomment-437859453, or mute the thread https://github.com/notifications/unsubscribe-auth/AGb2-o-UTp_iUhL0eyBG7B-50K_WF6eaks5uuWfXgaJpZM4YYEvQ .

jackjansen commented 5 years ago

Ok, thanks!