chore: 更新 .gitignore 文件

- 添加 docs 文件夹到忽略列表,以忽略 Doxygen 生成的文件
- 保持原有的忽略规则不变
This commit is contained in:
ZZY
2025-04-05 23:11:39 +08:00
parent c800b48ca2
commit 8d97fe896c
32 changed files with 3939 additions and 187 deletions

View File

@@ -20,7 +20,8 @@ static void default_handler(log_level_t level, const char* module, const char* f
case LOG_LEVEL_TRACE: level_str = "TRACE"; break;
default: level_str = "NOTSET"; break;
}
/// @note: 定义 __LOG_NO_COLOR__ 会取消颜色输出
#ifndef __LOG_NO_COLOR__
const char* color_code = ANSI_NONE;
switch (level) {
@@ -50,6 +51,12 @@ static logger_t root_logger = {
.handler = default_handler,
};
void init_logger(logger_t* logger, const char* name) {
logger->name = name;
logger->handler = default_handler;
log_set_level(logger, LOG_LEVEL_ALL);
}
logger_t* log_get(const char* name) {
return &root_logger;
}