code: def _logging_callback(level, domain, message, data):
      
      domain = ffi.string(domain).decode()
      message = ffi.string(message).decode()
      logger = LOGGER.getChild(domain)
  
      if level not in LOG_LEVELS:
          return
      logger.log(LOG_LEVELS[level], message)
docs: Callback that outputs libgphoto2's logging message via
          Python's standard logging facilities.
  
      :param level:   libgphoto2 logging level
      :param domain:  component the message originates from
      :param message: logging message
      :param data:    Other data in the logging record (unused)