mirror of
https://github.com/tailix/kernel.git
synced 2024-11-13 11:14:07 -05:00
54 lines
1 KiB
C
54 lines
1 KiB
C
#include "logger.h"
|
|
|
|
#include "console.h"
|
|
|
|
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);
|
|
}
|