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
When the zenoh.init_logger() function is called from an environment where env_logger was already initialized it crashes with the following error:
PyErr { type: <class 'pyo3_runtime.PanicException'>, value: PanicException('env_logger::init should not be called after logger initialized: SetLoggerError(())'),
Describe the bug
When the
zenoh.init_logger()
function is called from an environment whereenv_logger
was already initialized it crashes with the following error:This is well documented in the
env_logger
crate.A solution is to use
try_init
which returns an error instead of panicking, so change this line to something likeIt will avoid crashed and print in the log that the logger was already initialized.
To reproduce
Run
zenoh.init_logger()
in an environment with the logger already initialized (e.g. calling it from PyO3)System info
Not applicable
The text was updated successfully, but these errors were encountered: