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
To reproduce (based on getting_started/asyncio/driving/drive_raw_motors.py):
importasyncioimportloggingfromsphero_sdkimportSpheroRvrAsyncfromsphero_sdkimportSerialAsyncDalfromsphero_sdkimportRawMotorModesEnum# setup and test logginglogging.getLogger().setLevel(logging.INFO)
logging.info("Now the default logging works")
loop=asyncio.get_event_loop()
rvr=SpheroRvrAsync(
dal=SerialAsyncDal(
loop
)
)
logging.info("Now it does not")
This result is probably not intended, because it makes integration with existing projects more complicated.
The behavior is caused by logging_config.py's 'null_handler', so the workarounds are ether to set SpheroRvrAsync's
log_level to 2, which also cause other additional logs from the rover or to remove the 'null_handler' handler with
The proper solution would probably be to create and use a new named logger for the sdk, and block that when using LogLevel.Silent.
The text was updated successfully, but these errors were encountered:
ollipal
changed the title
Rover classes block all default logging making integration to existing projects difficult
Rvr classes block all default logging making integration to existing projects difficult
Jul 7, 2020
To reproduce (based on
getting_started/asyncio/driving/drive_raw_motors.py
):This result is probably not intended, because it makes integration with existing projects more complicated.
The behavior is caused by logging_config.py's 'null_handler', so the workarounds are ether to set SpheroRvrAsync's
log_level to 2, which also cause other additional logs from the rover or to remove the 'null_handler' handler with
after the RVR has been initialized.
The proper solution would probably be to create and use a new named logger for the sdk, and block that when using
LogLevel.Silent
.The text was updated successfully, but these errors were encountered: