Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
log.h File Reference

Go to the source code of this file.

Macros

#define LOG_ERR(...)   Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
 Writes an ERROR level message to the log. More...
 
#define LOG_WRN(...)   Z_LOG(LOG_LEVEL_WRN, __VA_ARGS__)
 Writes a WARNING level message to the log. More...
 
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
 Writes an INFO level message to the log. More...
 
#define LOG_DBG(...)   Z_LOG(LOG_LEVEL_DBG, __VA_ARGS__)
 Writes a DEBUG level message to the log. More...
 
#define LOG_PRINTK(...)   Z_LOG_PRINTK(__VA_ARGS__)
 Unconditionally print raw log message. More...
 
#define LOG_INST_ERR(_log_inst, ...)    Z_LOG_INSTANCE(LOG_LEVEL_ERR, _log_inst, __VA_ARGS__)
 Writes an ERROR level message associated with the instance to the log. More...
 
#define LOG_INST_WRN(_log_inst, ...)    Z_LOG_INSTANCE(LOG_LEVEL_WRN, _log_inst, __VA_ARGS__)
 Writes a WARNING level message associated with the instance to the log. More...
 
#define LOG_INST_INF(_log_inst, ...)    Z_LOG_INSTANCE(LOG_LEVEL_INF, _log_inst, __VA_ARGS__)
 Writes an INFO level message associated with the instance to the log. More...
 
#define LOG_INST_DBG(_log_inst, ...)    Z_LOG_INSTANCE(LOG_LEVEL_DBG, _log_inst, __VA_ARGS__)
 Writes a DEBUG level message associated with the instance to the log. More...
 
#define LOG_HEXDUMP_ERR(_data, _length, _str)    Z_LOG_HEXDUMP(LOG_LEVEL_ERR, _data, _length, _str)
 Writes an ERROR level hexdump message to the log. More...
 
#define LOG_HEXDUMP_WRN(_data, _length, _str)    Z_LOG_HEXDUMP(LOG_LEVEL_WRN, _data, _length, _str)
 Writes a WARNING level message to the log. More...
 
#define LOG_HEXDUMP_INF(_data, _length, _str)    Z_LOG_HEXDUMP(LOG_LEVEL_INF, _data, _length, _str)
 Writes an INFO level message to the log. More...
 
#define LOG_HEXDUMP_DBG(_data, _length, _str)    Z_LOG_HEXDUMP(LOG_LEVEL_DBG, _data, _length, _str)
 Writes a DEBUG level message to the log. More...
 
#define LOG_INST_HEXDUMP_ERR(_log_inst, _data, _length, _str)    Z_LOG_HEXDUMP_INSTANCE(LOG_LEVEL_ERR, _log_inst, _data, _length, _str)
 Writes an ERROR hexdump message associated with the instance to the log. More...
 
#define LOG_INST_HEXDUMP_WRN(_log_inst, _data, _length, _str)    Z_LOG_HEXDUMP_INSTANCE(LOG_LEVEL_WRN, _log_inst, _data, _length, _str)
 Writes a WARNING level hexdump message associated with the instance to the log. More...
 
#define LOG_INST_HEXDUMP_INF(_log_inst, _data, _length, _str)    Z_LOG_HEXDUMP_INSTANCE(LOG_LEVEL_INF, _log_inst, _data, _length, _str)
 Writes an INFO level hexdump message associated with the instance to the log. More...
 
#define LOG_INST_HEXDUMP_DBG(_log_inst, _data, _length, _str)    Z_LOG_HEXDUMP_INSTANCE(LOG_LEVEL_DBG, _log_inst, _data, _length, _str)
 Writes a DEBUG level hexdump message associated with the instance to the log. More...
 
#define LOG_MODULE_REGISTER(...)
 Create module-specific state and register the module with Logger. More...
 
#define LOG_MODULE_DECLARE(...)
 Macro for declaring a log module (not registering it). More...
 
#define LOG_LEVEL_SET(level)
 Macro for setting log level in the file or function where instance logging API is used. More...
 

Functions

static void log_printk (const char *fmt, va_list ap)
 
static char * log_strdup (const char *str)