15int LOGGING_LEVEL = LOG_LEVEL_INFO;
22 if (level > LOGGING_LEVEL && level != LOG_LEVEL_DEBUG)
return;
25 const char* level_str;
33 level_str =
"\033[93m[WARN]\033[0m";
36 level_str =
"\033[91m[ERROR]\033[0m";
39 level_str =
"\033[90m[DEBUG]\033[0m";
49 const char *fmt = va_arg(ap,
const char*);
Tools for printing to the console and serial output.
void void kvprintf(const char *fmt, va_list ap)
Handles printing a formatted string.
Utilities for memory and string operations.
size_t strlen(const char *str)
Calculates the length of a string.
char * strcat(char *str1, const char *str2)
Concatenates (joins) 2 strings.
bool get_debug_on(void)
Gets the current value of LOG_ENABLE_DEBUG.
static bool LOG_ENABLE_DEBUG
Should the logging util print Debug statements.
void klog(int level,...)
Formats a string to hold a logging level and print it.
void set_debug_on(bool is_on)
Sets the debug mode.
Logging utilities for the kernel.