The log module performs per-module, per-level logging.
More...
The log module performs per-module, per-level logging.
◆ log_6addr()
void log_6addr |
( |
const uip_ipaddr_t * |
ipaddr | ) |
|
Logs an IPv6 address.
- Parameters
-
Definition at line 87 of file log.c.
◆ log_6addr_compact()
void log_6addr_compact |
( |
const uip_ipaddr_t * |
ipaddr | ) |
|
Logs an IPv6 address with a compact format.
- Parameters
-
Definition at line 117 of file log.c.
◆ 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.
- Parameters
-
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 95 of file log.c.
◆ log_get_level()
int log_get_level |
( |
const char * |
module | ) |
|
Returns the current log level.
- Parameters
-
module | The target module string descriptor |
- Returns
- The current log level
Definition at line 176 of file log.c.
◆ log_level_to_str()
const char * log_level_to_str |
( |
int |
level | ) |
|
Returns a textual description of a log level.
- Parameters
-
- Returns
- The textual description
Definition at line 192 of file log.c.
◆ log_lladdr()
void log_lladdr |
( |
const linkaddr_t * |
lladdr | ) |
|
Logs a link-layer address.
- Parameters
-
lladdr | The link-layer address |
Definition at line 126 of file log.c.
◆ log_lladdr_compact()
void log_lladdr_compact |
( |
const linkaddr_t * |
lladdr | ) |
|
Logs a link-layer address with a compact format.
- Parameters
-
lladdr | The link-layer address |
Definition at line 143 of file log.c.
◆ log_set_level()
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.
- Parameters
-
module | The target module string descriptor |
level | The log level |
Definition at line 161 of file log.c.