add data logging to mqtt server