fix: better logging behaviour

This commit is contained in:
Tobias Reisinger 2020-07-26 21:00:05 +02:00
parent 3e6d0333b7
commit 398019afe8
36 changed files with 256 additions and 188 deletions
src/handlers

View file

@ -47,7 +47,7 @@ handle_mqtt_publish(struct mg_mqtt_message *msg)
char *topic = malloc(sizeof(char) * (msg->topic.len + 1));
strncpy(topic, msg->topic.p, msg->topic.len);
topic[msg->topic.len] = '\0';
LOG_DEBUG("received mqtt publish for topic %s\n", topic);
LOGGER_DEBUG("received mqtt publish for topic %s\n", topic);
char *payload = malloc(sizeof(char) * (msg->payload.len + 1));
strncpy(payload, msg->payload.p, msg->payload.len);