X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/05b7549a0f980efa33265a091a5174a78851ce05..b632f535c4a6882bdca0317fb88cbe6e165f24eb:/lunaix-os/includes/lunaix/syslog.h diff --git a/lunaix-os/includes/lunaix/syslog.h b/lunaix-os/includes/lunaix/syslog.h index 91e2003..464a133 100644 --- a/lunaix-os/includes/lunaix/syslog.h +++ b/lunaix-os/includes/lunaix/syslog.h @@ -3,27 +3,35 @@ #include -#define _LEVEL_INFO "0" -#define _LEVEL_WARN "1" +#define _LEVEL_INFO "0" +#define _LEVEL_WARN "1" #define _LEVEL_ERROR "2" - -#define KINFO "\x1b" _LEVEL_INFO -#define KWARN "\x1b" _LEVEL_WARN -#define KERROR "\x1b" _LEVEL_ERROR - -#define LOG_MODULE(module) \ - static void kprintf(const char* fmt, ...) { \ - va_list args; \ - va_start(args, fmt); \ - __kprintf(module, fmt, args); \ - va_end(args); \ +#define _LEVEL_DEBUG "3" + +#define KINFO "\x1b" _LEVEL_INFO +#define KWARN "\x1b" _LEVEL_WARN +#define KERROR "\x1b" _LEVEL_ERROR +#define KDEBUG "\x1b" _LEVEL_DEBUG + +#define LOG_MODULE(module) \ + static void kprintf(const char* fmt, ...) \ + { \ + va_list args; \ + va_start(args, fmt); \ + __kprintf(module, fmt, args); \ + va_end(args); \ } void __kprintf(const char* component, const char* fmt, va_list args); +void +kprint_hex(const void* buffer, unsigned int size); void kprint_panic(const char* fmt, ...); +void +kprint_dbg(const char* fmt, ...); + #endif /* __LUNAIX_SYSLOG_H */