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
Cython removes the stack frames, causing Loguru to access the wrong context when a message is logged. Therefore, the logged message is associated with an incorrect module name, and disable() cannot filter it properly.
I'm not aware of any possible workaround, unfortunately. :/
Note that Cython compatibility with Loguru was improved by #1240.
Using logger.disable(None) should disable logs coming from Cython modules.
The logger.disable() method takes as input the name of the logger to disable (usually a string). Here, None is used because the logger within Cython modules has no name (due to the absence of available stack frame).
Hi,
I'm using Cython and loguru works but I can't manage (disable) logging:
the above code works for source distribution and doesn't work with the binary (Cythonized) distribution.
Has anyone experienced this behavior?
The text was updated successfully, but these errors were encountered: