A small question regarding logging

Setup: Olympe 7.2, Python, Raspberry PI 4.

I’m using this construct in order to control the logging of the SDK:

    olympe.log.update_config({"loggers": {"olympe": {"level": args.olympe_log_level.upper()}}})

I’m providing the desired log level by command line argument. That works.

However, after a drone.connect() I’m repeatedly receiving these warnings, which I am - at least I’m believing that - not provoking with any action, even with the simplest thinkable app:

    drone = olympe.Drone(DRONE_IP)
2022-06-03 11:39:08,098 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0xa1000001
2022-06-03 11:39:08,101 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0xa2000005
2022-06-03 11:39:08,101 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0xa2000004
2022-06-03 11:39:08,102 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0xa3000004
2022-06-03 11:39:08,123 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0x9d000009
2022-06-03 11:39:08,124 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0xa5000002
2022-06-03 11:39:08,127 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id: 18 in common.CommonState
2022-06-03 11:39:08,262 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0x9f000001
2022-06-03 11:39:08,265 [WARNING]       olympe.drone.ANAFI-G134295 - _recv_cmd_cb - Unknown message id 0xa5000001

Anybody able to comment on these warnings?


EDIT: Initially mentioned second problem was mine, sorry.


I also noticed a little side effect with my logging. I’m for sure using the same logging infrastructure.

Even though I instantiate my logger most likely completely different, setting the olympe log level has an impact to my logging.

My logger:

import logging

class Logger(logging.StreamHandler):
    def __init__(self, *args):
        formatter = logging.Formatter("%(asctime)s %(filename)-10s-%(levelname)-8s: %(message)s")

logger = logging.getLogger("mylogger")

So if I for instance provide an arg log-level as "info" and a olympe-log-level as "warning", the configuration of the olympe log level silences all my logger outputs above WARNING.

Not sure how this comes. Until now I could separate from other logging components by this construct:

logger = logging.getLogger("<unique-log-name>")

Disregard. Couldn’t reproduce on down stripped code

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.