1
0
mirror of https://github.com/FreeRTOS/coreMQTT synced 2025-06-05 19:30:22 +08:00

Fix logging call in MQTT, Make hygiene improvement in logging stack (#1095)

* Fix issues with logging across files

* Fix format specifier causing warning
This commit is contained in:
Archit Aggarwal 2020-08-04 11:14:39 -07:00 committed by GitHub
parent c43f4d85f9
commit a26a769fb4
3 changed files with 9 additions and 4 deletions

View File

@ -1109,7 +1109,7 @@ static MQTTStatus_t sendPublish( MQTTContext_t * pContext,
}
else
{
LogDebug( "PUBLISH payload was not sent. Payload length was zero." );
LogDebug( ( "PUBLISH payload was not sent. Payload length was zero." ) );
}
}

View File

@ -1164,7 +1164,7 @@ static MQTTStatus_t deserializePublish( const MQTTPacketInfo_t * pIncomingPacket
pPublishInfo->pPayload = pPacketIdentifierHigh + sizeof( uint16_t );
}
LogDebug( ( "Payload length %hu.", pPublishInfo->payloadLength ) );
LogDebug( ( "Payload length %lu.", pPublishInfo->payloadLength ) );
}
return status;

View File

@ -15,8 +15,13 @@
#include "logging_levels.h"
/* Configure name and log level for the MQTT library. */
#define LIBRARY_LOG_NAME "MQTT"
#define LIBRARY_LOG_LEVEL LOG_NONE
#ifndef LIBRARY_LOG_NAME
#define LIBRARY_LOG_NAME "MQTT"
#endif
#ifndef LIBRARY_LOG_LEVEL
#define LIBRARY_LOG_LEVEL LOG_NONE
#endif
#include "logging_stack.h"