Lines Matching full:log

15 /** Log levels supported, ranging from most to least important */
36 * Log categories supported. Most of these correspond to uclasses (i.e.
53 LOGC_COUNT, /* Number of log categories */
54 LOGC_END, /* Sentinel value for a list of log categories */
57 /* Helper to cast a uclass ID to a log category */
64 * _log() - Internal function to emit a new log record
66 * @cat: Category of log record (indicating which subsystem generated it)
67 * @level: Level of log record (indicating its severity)
68 * @file: File name of file where log record was generated
69 * @line: Line number in file where log record was generated
70 * @func: Function where log record was generated
71 * @fmt: printf() format string for log record
73 * @return 0 if log record was emitted, -ve on error
93 #if CONFIG_IS_ENABLED(LOG)
95 #define log_err(_fmt...) log(LOG_CATEGORY, LOGL_ERR, ##_fmt)
96 #define log_warning(_fmt...) log(LOG_CATEGORY, LOGL_WARNING, ##_fmt)
97 #define log_notice(_fmt...) log(LOG_CATEGORY, LOGL_NOTICE, ##_fmt)
98 #define log_info(_fmt...) log(LOG_CATEGORY, LOGL_INFO, ##_fmt)
99 #define log_debug(_fmt...) log(LOG_CATEGORY, LOGL_DEBUG, ##_fmt)
100 #define log_content(_fmt...) log(LOG_CATEGORY, LOGL_DEBUG_CONTENT, ##_fmt)
101 #define log_io(_fmt...) log(LOG_CATEGORY, LOGL_DEBUG_IO, ##_fmt)
113 #if CONFIG_IS_ENABLED(LOG)
120 /* Emit a log record if the level is less that the maximum */
121 #define log(_cat, _level, _fmt, _args...) ({ \ macro
123 if (CONFIG_IS_ENABLED(LOG) && (_l <= _LOG_MAX_LEVEL || _LOG_DEBUG)) \
129 #define log(_cat, _level, _fmt, _args...) macro
144 #if !_DEBUG && CONFIG_IS_ENABLED(LOG)
149 log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \
190 #if CONFIG_IS_ENABLED(LOG) && defined(CONFIG_LOG_ERROR_RETURN)
192 * Log an error return value, possibly with a message. Usage:
203 log(LOG_CATEGORY, LOGL_ERR, "returning err=%d\n", __ret); \
209 log(LOG_CATEGORY, LOGL_ERR, "%s: returning err=%d\n", _msg, \
220 * struct log_rec - a single log record
222 * Holds information about a single record in the log
226 * Memebers marked as 'allocated' are allocated (e.g. via strdup()) by the log
231 * @file: Name of file where the log record was generated (not allocated)
232 * @line: Line number where the log record was generated
233 * @func: Function where the log record was generated (not allocated)
234 * @msg: Log message (allocated)
248 * struct log_driver - a driver which accepts and processes log records
255 * emit() - emit a log record
257 * Called by the log system to pass a log record to a particular driver
264 * struct log_device - an instance of a log driver
293 * struct log_filter - criterial to filter out log messages
302 * @max_level: Maximum log level to allow
305 * @sibling_node: Next filter in the list of filters for this log device
337 * log_get_level_name() - Get the name of a log level
339 * @level: Log level to look up
340 * @return log level name (in ALL CAPS)
345 * log_get_level_by_name() - Look up a log level by name
348 * @return log level ID, or LOGL_NONE if not found
352 /* Log format flags (bit numbers) for gd->log_fmt. See log_fmt_chars */
366 /* Handle the 'log test' command */
370 * log_add_filter() - Add a new filter to a log device
377 * @max_level: Maximum log level to allow
387 * log_remove_filter() - Remove a filter from a log device
397 #if CONFIG_IS_ENABLED(LOG)
399 * log_init() - Set up the log system ready for use