refactor: organize all arch related files together.
[lunaix-os.git] / lunaix-os / includes / lunaix / syslog.h
index 91e20036461e712cbfd10c83a3cecf1f9fcfb5ef..464a133f889b89f90119f02e24f0e085eb50b545 100644 (file)
@@ -3,27 +3,35 @@
 
 #include <stdarg.h>
 
-#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 */