ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
logprintf.cpp File Reference

实现带有基于级别着色的控制台日志格式化 More...

#include "actor/actor_logic/actor_log/actor_log.h"
#include "tools/tools/tools_time_wheel.h"
#include "actor/actor_base/core/actor.h"
#include "actor/protocol/nprotocol.h"
#include "tools/tools/tools_time.h"
#include "actor/tab/ttab_servers.h"
#include "tools/tools/tools_enum.h"
#include "tools/tab/xml/xmlinfo.h"
#include "tools/log/logprintf.h"
#include "tools/tab/xml/xml.h"
#include "tools/log/nlog.h"
#include <filesystem>
#include <iostream>
#include <format>

Classes

struct  ngl::logfile_default
 默认日志文件实现 More...
struct  ngl::logfile_bi
 BI日志文件实现 More...

Detailed Description

实现带有基于级别着色的控制台日志格式化

提供以下功能:

  1. 控制台日志输出:根据日志级别使用不同颜色(Windows/Linux)
  2. 日志文件管理:按服务器名、流类型、日期分目录存储
  3. 日志轮转:基于行数自动创建新日志文件
  4. BI日志:专用的业务智能日志文件变体
Note
Windows使用SetConsoleTextAttribute着色,Linux使用ANSI转义序列
See also
logprintf.h, logfile