#define OIC_LOG_BUFFER(level, tag, buffer, bufferSize)
#else // These macros are defined for Linux, Android, and Arduino
#define OIC_LOG_INIT() OICLogInit()
-#define OIC_LOG_BUFFER(level, tag, buffer, bufferSize)\
- OICLogBuffer((level), (tag), (buffer), (bufferSize))
#ifdef ARDUINO
#define OIC_LOG_CONFIG(ctx)
#define OIC_LOG_V(level, tag, ...)
// To enable OIC_LOG_V, uncomment the below
//#define OIC_LOG_V(level, tag, format, ...) OICLogv((level), PCF(tag), __LINE__, PCF(format), __VA_ARGS__)
+#define OIC_LOG_BUFFER(level, tag, buffer, bufferSize)\
+ OICLogBuffer((level), PCF(tag), (buffer), (bufferSize))
#else
#define OIC_LOG_CONFIG(ctx) OICLogConfig((ctx))
#define OIC_LOG_SHUTDOWN() OICLogShutdown()
#define OIC_LOG(level, tag, logStr) OICLog((level), (tag), (logStr))
#define OIC_LOG_V(level, tag, ...) OICLogv((level), (tag), __VA_ARGS__)
+#define OIC_LOG_BUFFER(level, tag, buffer, bufferSize)\
+ OICLogBuffer((level), tag, (buffer), (bufferSize))
#endif //ARDUINO
#endif //__TIZEN__
#else //TB_LOG
#ifdef __cplusplus
}
#endif // __cplusplus
-#endif /* U_LOGGER_H_ */
\ No newline at end of file
+#endif /* U_LOGGER_H_ */
{
for (uint32_t i = 0; i < info->numOptions; i++)
{
- OIC_LOG_V(DEBUG, TAG, "optionID: %d", info->options[i].optionID);
+ OIC_LOG_V(DEBUG, TAG, "optionID: %u", info->options[i].optionID);
OIC_LOG_V(DEBUG, TAG, "list: %s", info->options[i].optionData);
}
OIC_LOG_BUFFER(DEBUG, TAG, (const uint8_t *) info->token,
info->tokenLength);
}
- OIC_LOG_V(DEBUG, TAG, "msgID: %d", info->messageId);
+ OIC_LOG_V(DEBUG, TAG, "msgID: %u", info->messageId);
}
else
{
RM_NULL_CHECK_VOID(index, TAG, "index");
for (uint32_t i = 0; i < numOptions; i++)
{
- OC_LOG_V(DEBUG, TAG, "Request- optionID: %d", options[i].optionID);
+ OC_LOG_V(DEBUG, TAG, "Request- optionID: %u", options[i].optionID);
if (RM_OPTION_MESSAGE_SWITCHING == options[i].optionID)
{
OC_LOG_V(INFO, TAG, "Found Option at %d", i);
TAG, #arg " is NULL"); return (retVal); } }
#define VERIFY_NON_NULL_NR(arg, logLevel) { if (!(arg)) { OC_LOG((logLevel), \
TAG, #arg " is NULL"); return; } }
-#define VERIFY_NON_NULL_V(arg) { if (!arg) {OC_LOG_V(FATAL, TAG, "%s is NULL", #arg);\
+#define VERIFY_NON_NULL_V(arg) { if (!arg) {OC_LOG(FATAL, TAG, #arg " is NULL");\
goto exit;} }
//TODO: we should allow the server to define this
&(((OCResource *) presenceResource.handle)->resourceProperties),
OC_ACTIVE, 0);
#endif
-
+#ifndef WITH_ARDUINO
if (result == OC_STACK_OK)
{
result = SRMInitSecureResources();
}
-
+#endif
return result;
}