10 #ifndef _COAP_DEBUG_H_ 11 #define _COAP_DEBUG_H_ 14 #define COAP_DEBUG_FD stdout 18 #define COAP_ERR_FD stderr 58 #define coap_log(...) coap_log_impl(__VA_ARGS__) 64 #define info(...) coap_log(LOG_INFO, __VA_ARGS__) 65 #define warn(...) coap_log(LOG_WARNING, __VA_ARGS__) 66 #define debug(...) coap_log(LOG_DEBUG, __VA_ARGS__) 80 #define coap_show_pdu(x) 81 #define coap_print_addr(...)
coap_log_t coap_get_log_level(void)
Returns the current log level.
multi-purpose address abstraction
void coap_show_pdu(const coap_pdu_t *)
void coap_log_impl(coap_log_t level, const char *format,...)
Writes the given text to COAP_ERR_FD (for level <= LOG_CRIT) or COAP_DEBUG_FD (for level >= LOG_WARNI...
void coap_set_log_level(coap_log_t level)
Sets the log level to the specified value.
Header structure for CoAP PDUs.
coap_log_t
Pre-defined log levels akin to what is used in syslog.
const char * coap_package_name(void)
Returns a zero-terminated string with the name of this library.
Pre-defined constants that reflect defaults for CoAP.
const char * coap_package_version(void)
Returns a zero-terminated string with the library version.
size_t coap_print_addr(const struct coap_address_t *, unsigned char *, size_t)