esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
log.hpp File Reference
#include "common.hpp"
#include "../port/clock/port.hpp"

Go to the source code of this file.

Macros

#define NDNPH_LOG_PRINTF(...)   Serial.printf(__VA_ARGS__)
 
#define NDNPH_LOG_NOWVAR   millis()
 
#define NDNPH_LOG_NOWFMT   "%lu"
 
#define NDNPH_LOG_MSG(category, fmt, ...)    NDNPH_LOG_PRINTF(NDNPH_LOG_NOWFMT " [" category "] " fmt, NDNPH_LOG_NOWVAR, ##__VA_ARGS__)
 Log a message without "\n".
 
#define NDNPH_LOG_LINE(category, fmt, ...)   NDNPH_LOG_MSG(category, fmt "\n", ##__VA_ARGS__)
 Log a message with "\n".
 

Macro Definition Documentation

◆ NDNPH_LOG_LINE

#define NDNPH_LOG_LINE (   category,
  fmt,
  ... 
)    NDNPH_LOG_MSG(category, fmt "\n", ##__VA_ARGS__)

Log a message with "\n".

See also
NDNPH_LOG_MSG

◆ NDNPH_LOG_MSG

#define NDNPH_LOG_MSG (   category,
  fmt,
  ... 
)     NDNPH_LOG_PRINTF(NDNPH_LOG_NOWFMT " [" category "] " fmt, NDNPH_LOG_NOWVAR, ##__VA_ARGS__)

Log a message without "\n".

Parameters
categorymessage category. It may contain format specifiers for variables after fmt .
fmtformat string.

◆ NDNPH_LOG_NOWFMT

#define NDNPH_LOG_NOWFMT   "%lu"

◆ NDNPH_LOG_NOWVAR

#define NDNPH_LOG_NOWVAR   millis()

◆ NDNPH_LOG_PRINTF

#define NDNPH_LOG_PRINTF (   ...)    Serial.printf(__VA_ARGS__)