27 lines
542 B
C
27 lines
542 B
C
// This file is part of noxos and licensed under the MIT open source license
|
|
|
|
#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)
|
|
|
|
typedef enum {
|
|
LOG_NONE,
|
|
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, ...);
|
|
|
|
#endif //NOX_LOGGER_H
|