kernel/inc/utils/logger.h

27 lines
542 B
C
Raw Normal View History

// This file is part of noxos and licensed under the MIT open source license
2023-01-25 21:36:34 +00:00
#ifndef NOX_LOGGER_H
#define NOX_LOGGER_H
#include "string.h"
#define LOG_PORT 0x3F8
#define DEBUG(f, args...) log(LOG_DEBUG, "%s:%d -> " f, __FILE_NAME__, __LINE__, ##args)
2023-01-25 21:36:34 +00:00
typedef enum {
LOG_NONE,
2023-01-25 21:36:34 +00:00
LOG_INFO,
LOG_DEBUG,
LOG_WARNING,
LOG_ERROR,
LOG_ENUM_END
} log_level_E;
// logs a string to qemu's serial port
void graphical_log_init ();
void log (log_level_E log_level, string_t string, ...);
2023-01-25 21:36:34 +00:00
#endif //NOX_LOGGER_H