Changes in uspace/lib/c/include/io/log.h [aa492fe:e0c836e8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/log.h
raa492fe re0c836e8 36 36 37 37 #include <stdarg.h> 38 #include <inttypes.h> 38 39 #include <io/verify.h> 39 40 41 /** Log message level. */ 40 42 typedef enum { 43 /** Fatal error, program is not able to recover at all. */ 41 44 LVL_FATAL, 45 /** Serious error but the program can recover from it. */ 42 46 LVL_ERROR, 47 /** Easily recoverable problem. */ 43 48 LVL_WARN, 49 /** Information message that ought to be printed by default. */ 44 50 LVL_NOTE, 51 /** Debugging purpose message. */ 45 52 LVL_DEBUG, 53 /** More detailed debugging message. */ 46 54 LVL_DEBUG2, 47 55 … … 50 58 } log_level_t; 51 59 52 extern int log_init(const char *, log_level_t); 53 extern void log_msg(log_level_t, const char *, ...) 54 PRINTF_ATTRIBUTE(2, 3); 55 extern void log_msgv(log_level_t, const char *, va_list); 60 /** Log itself (logging target). */ 61 typedef sysarg_t log_t; 62 /** Formatting directive for printing log_t. */ 63 #define PRIlogctx PRIxn 64 65 /** Default log (target). */ 66 #define LOG_DEFAULT ((log_t) -1) 67 68 /** Use when creating new top-level log. */ 69 #define LOG_NO_PARENT ((log_t) 0) 70 71 extern const char *log_level_str(log_level_t); 72 extern int log_level_from_str(const char *, log_level_t *); 73 74 extern int log_init(const char *); 75 extern log_t log_create(const char *, log_t); 76 77 extern void log_msg(log_t, log_level_t, const char *, ...) 78 PRINTF_ATTRIBUTE(3, 4); 79 extern void log_msgv(log_t, log_level_t, const char *, va_list); 56 80 57 81 #endif
Note:
See TracChangeset
for help on using the changeset viewer.