mirror of
https://github.com/tailix/kernel.git
synced 2024-10-30 12:03:52 -04:00
59 lines
1.1 KiB
C
59 lines
1.1 KiB
C
#include "logger.h"
|
|
|
|
#include "console.h"
|
|
|
|
void logger_initialize()
|
|
{
|
|
console_initialize();
|
|
}
|
|
|
|
void logger_info(const char *const s)
|
|
{
|
|
console_setcolor(VGA_COLOR_LIGHT_GREY);
|
|
console_putc('[');
|
|
|
|
console_setcolor(VGA_COLOR_CYAN);
|
|
console_print("INFO");
|
|
|
|
console_setcolor(VGA_COLOR_LIGHT_GREY);
|
|
console_putc(']');
|
|
|
|
console_putc(' ');
|
|
|
|
console_setcolor(VGA_COLOR_WHITE);
|
|
console_puts(s);
|
|
}
|
|
|
|
void logger_warn(const char *const s)
|
|
{
|
|
console_setcolor(VGA_COLOR_LIGHT_GREY);
|
|
console_putc('[');
|
|
|
|
console_setcolor(VGA_COLOR_MAGENTA);
|
|
console_print("WARN");
|
|
|
|
console_setcolor(VGA_COLOR_LIGHT_GREY);
|
|
console_putc(']');
|
|
|
|
console_putc(' ');
|
|
|
|
console_setcolor(VGA_COLOR_WHITE);
|
|
console_puts(s);
|
|
}
|
|
|
|
void logger_fail(const char *const s)
|
|
{
|
|
console_setcolor(VGA_COLOR_LIGHT_GREY);
|
|
console_putc('[');
|
|
|
|
console_setcolor(VGA_COLOR_RED);
|
|
console_print("FAIL");
|
|
|
|
console_setcolor(VGA_COLOR_LIGHT_GREY);
|
|
console_putc(']');
|
|
|
|
console_putc(' ');
|
|
|
|
console_setcolor(VGA_COLOR_WHITE);
|
|
console_puts(s);
|
|
}
|