Commit fbbee2c3 authored by Peter-Bernd Otte's avatar Peter-Bernd Otte
Browse files

removed unnecessary on_log part.

parent 523ab5f0
......@@ -22,21 +22,6 @@ logger.setLevel(logging.WARNING-(args.verbosity*10 if args.verbosity <=2 else 20
mlast = {}
def on_log(client, userdata, level, buff):
if level in (paho.MQTT_LOG_NOTICE, paho.MQTT_LOG_INFO):
logger.debug("MQTT Client Log: ({}) {}".format(level,buff))
elif level == paho.MQTT_LOG_WARNING:
logger.warning("MQTT Client Log: ({}) {}".format(level,buff))
elif level == paho.MQTT_LOG_ERR:
logger.error("MQTT Client Log: ({}) {}".format(level,buff))
elif level == paho.MQTT_LOG_DEBUG:
logger.debug("MQTT Client Log: ({}) {}".format(level,buff))
logger.warning("MQTT Client Log: Log level not supported.")
def on_connect(client, userdata, flags, rc):
if rc==0:"MQTT connected OK. Return code "+str(rc) )
......@@ -154,7 +139,6 @@ if os.path.exists(args.config_file):
client.on_connect = on_connect
client.on_disconnect = on_disconnect
#client.on_log = on_log
client.enable_logger(logger) #info:"connecting to broker: "+args.mqtt_broker_host+". If it fails, check whether the broker is reachable. Check the -b option.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment