1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-20 11:16:10 -05:00
kernel/arch/logger.c
2017-11-04 02:39:16 +00:00

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);
}