You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of this, there is no clean way to configure the logger all over owslib.
Even worst is that, when used inside another application, the root logger must often be silenced or raised to ERROR or WARNING level to avoid too much noise, since it can combine many other locations. This makes it unpractical to debug specific operations in owslib.
The logging references should be unified to all employ (at least) the owslib namespace instead of root.
A quick fix would be to replace import logging as log in owslib.util by the following:
importlogginglog=logging.getLogger(__name__)
This way, any place "incorrectly" using the logging alias as log would at least transparently use a namespace'd logger instead.
Maybe there are other locations to patch, but I have not explored the full repository for other logging references.
The text was updated successfully, but these errors were encountered:
Some places use these references to obtain a logger:
OWSLib/owslib/util.py
Line 10 in 79909b4
OWSLib/owslib/wps.py
Lines 115 to 116 in 79909b4
OWSLib/owslib/wps.py
Line 308 in 79909b4
This causes the
log.<level>
function called to use theroot
logger.On the other hand, the following use a specific logger (resulting in
owslib.wps
):OWSLib/owslib/wps.py
Line 144 in 79909b4
Because of this, there is no clean way to configure the logger all over
owslib
.Even worst is that, when used inside another application, the
root
logger must often be silenced or raised toERROR
orWARNING
level to avoid too much noise, since it can combine many other locations. This makes it unpractical to debug specific operations inowslib
.The logging references should be unified to all employ (at least) the
owslib
namespace instead ofroot
.A quick fix would be to replace
import logging as log
inowslib.util
by the following:This way, any place "incorrectly" using the
logging
alias aslog
would at least transparently use a namespace'd logger instead.Maybe there are other locations to patch, but I have not explored the full repository for other logging references.
The text was updated successfully, but these errors were encountered: