#include <cpu_io.h>
#include <etl/format.h>
#include <MPMCQueue.hpp>
#include <atomic>
#include <cstdint>
#include "kstd_cstdio"
Go to the source code of this file.
|
| __always_inline auto | klog::detail::PutStr (const char *s) -> void |
| | 通过 etl_putchar 输出字符串(空指针安全)
|
| |
| auto | klog::detail::TryDrain () -> void |
| | 将队列中所有条目输出至串口
|
| |
| template<Level Lvl, typename... Args> |
| __always_inline auto | klog::detail::Log (etl::format_string< Args... > fmt, Args &&... args) -> void |
| | 核心实现:格式化消息并入队,随后尝试排空
|
| |
| template<typename... Args> |
| auto | klog::Debug (etl::format_string< Args... > fmt, Args &&... args) -> void |
| | 以 DEBUG 级别记录日志(SIMPLEKERNEL_MIN_LOG_LEVEL > 0 时编译期消除)
|
| |
| template<typename... Args> |
| auto | klog::Info (etl::format_string< Args... > fmt, Args &&... args) -> void |
| | 以 INFO 级别记录日志
|
| |
| template<typename... Args> |
| auto | klog::Warn (etl::format_string< Args... > fmt, Args &&... args) -> void |
| | 以 WARN 级别记录日志
|
| |
| template<typename... Args> |
| auto | klog::Err (etl::format_string< Args... > fmt, Args &&... args) -> void |
| | 以 ERROR 级别记录日志
|
| |
| __always_inline auto | klog::Flush () -> void |
| | 强制将队列中所有日志条目输出至串口
|
| |
| __always_inline auto | klog::RawPut (const char *msg) -> void |
| | 绕过队列直接输出至串口(用于 panic 路径)
|
| |