This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/content/projects/noxos/docs/codebase/utils/logger.h.md

20 lines
782 B
Markdown
Raw Normal View History

---
title: "logger.h"
summary: "functionalities to write logs to QEMU's serial port."
---
# `DEBUG(string, ...)` - macro
calls `log` with log_level _Debug_.
Puts filename and line number in front of the format text.
# `log_level_E` - enum
- **None** - Logs just the message without a prefix
- **Info** - General information, that could be useful
- **Debug** - Should only be used to find bugs and removed (or commented out) after the bug is found
- **Warning** - Used for warnings and not important errors
- **Error** - Used for Fatal Errors / Will be printed to the screen (graphics driver is not Implemented yet)
# `log(log_level, string, ...)` - function (void)
Logs the given string to QEMU's log port, the string is prefixed with the log type.
Format strings are supported.