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
Currently the log_level function only seems to work in certain contexts, will be required to fix and potentially add tests that ensrue it works as expected.
The current logging system writes directly to stdout. This is problematic for some use cases like interactive Jupyter sessions because the stdout is only displayed in the console and not in the browser. I suggest to directly use Python's logging module. That way the user can configure it as they want in a pythonic way.
@alexander-g I remember seeing a mention about this in the pybind documentation, totally agree, best to do this. I'll update the name of this issue.
axsaucedo
changed the title
[PYTHON] Fix log_level on the python implementation
[PYTHON] Fix log_level on the python implementation (using pybind's logging functions)
Jan 16, 2021
I can’t stop the logger from spamming info to stdout.log_level(i) does not seem to have any effect. Is this related to this issue or should I open a new ticket?
Currently the log_level function only seems to work in certain contexts, will be required to fix and potentially add tests that ensrue it works as expected.
Edit:
It would also be possible to use some of the pybind utilities to perform the logging in a way that is consistent with the Python space https://pybind11.readthedocs.io/en/stable/advanced/pycpp/utilities.html#capturing-standard-output-from-ostream
The text was updated successfully, but these errors were encountered: