![]() |
Contiki-NG
|
Functions | |
| void | log_6addr (const uip_ipaddr_t *ipaddr) |
| Logs an IPv6 address. | |
| int | log_6addr_compact_snprint (char *buf, size_t size, const uip_ipaddr_t *ipaddr) |
| Write at most size - 1 characters of the IP address to the output string, in a compact representation. | |
| void | log_6addr_compact (const uip_ipaddr_t *ipaddr) |
| Logs an IPv6 address with a compact format. | |
| void | log_lladdr (const linkaddr_t *lladdr) |
| Logs a link-layer address. | |
| void | log_lladdr_compact (const linkaddr_t *lladdr) |
| Logs a link-layer address with a compact format. | |
| void | log_bytes (const void *data, size_t length) |
| Logs a byte array as hex characters. | |
| void | log_string (const char *text, size_t length) |
| Logs a string that has a length specified, but might not be zero-terminated. | |
| void | log_set_level (const char *module, int level) |
| Sets a log level at run-time. | |
| int | log_get_level (const char *module) |
| Returns the current log level. | |
| const char * | log_level_to_str (int level) |
| Returns a textual description of a log level. | |
The log module performs per-module, per-level logging
| void log_6addr | ( | const uip_ipaddr_t * | ipaddr | ) |
Logs an IPv6 address.
| ipaddr | The IPv6 address |
Definition at line 93 of file log.c.
References ipaddr, and uiplib_ipaddr_snprint().
Referenced by coap_endpoint_log().
| void log_6addr_compact | ( | const uip_ipaddr_t * | ipaddr | ) |
Logs an IPv6 address with a compact format.
| ipaddr | The IPv6 address |
Definition at line 123 of file log.c.
References ipaddr, and log_6addr_compact_snprint().
| int log_6addr_compact_snprint | ( | char * | buf, |
| size_t | size, | ||
| const uip_ipaddr_t * | ipaddr ) |
Write at most size - 1 characters of the IP address to the output string, in a compact representation.
The output is always null-terminated, unless size is 0.
| buf | A pointer to an output string with at least size bytes. |
| size | The max number of characters to write to the output string. |
| ipaddr | A pointer to a uip_ipaddr_t that will be printed with printf(). |
Definition at line 101 of file log.c.
References deployment_id_from_iid(), ipaddr, UIP_HTONS, uip_is_addr_linklocal, and uip_is_addr_mcast.
Referenced by log_6addr_compact(), rpl_neighbor_snprint(), and uip_sr_link_snprint().
| void log_bytes | ( | const void * | data, |
| size_t | length ) |
| int log_get_level | ( | const char * | module | ) |
| const char * log_level_to_str | ( | int | level | ) |
| void log_lladdr | ( | const linkaddr_t * | lladdr | ) |
| void log_lladdr_compact | ( | const linkaddr_t * | lladdr | ) |
Logs a link-layer address with a compact format.
| lladdr | The link-layer address |
Definition at line 149 of file log.c.
References deployment_id_from_lladdr(), linkaddr_cmp(), linkaddr_null, and UIP_HTONS.
| void log_set_level | ( | const char * | module, |
| int | level ) |
Sets a log level at run-time.
Logs are included in the firmware via the compile-time flags in log-conf.h, but this allows to force lower log levels, system-wide.
| module | The target module string descriptor |
| level | The log level |