ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::logprintf Class Reference

控制台日志格式化器。 More...

#include <logprintf.h>

Static Public Member Functions

static void printf (ELOGLEVEL acolor, const char *apos, const char *atimestr, const char *amsg)
 格式化并输出日志到控制台。

Detailed Description

控制台日志格式化器。

提供带颜色和时间戳前缀的控制台日志输出功能。

Member Function Documentation

◆ printf()

void ngl::logprintf::printf ( ELOGLEVEL acolor,
const char * apos,
const char * atimestr,
const char * amsg )
static

格式化并输出日志到控制台。

格式化输出日志到控制台

Parameters
acolor日志级别(决定颜色)
apos源文件位置字符串
atimestr时间戳字符串
amsg日志消息内容

根据日志级别使用不同颜色输出

Parameters
acolor日志级别
apos源码位置信息
atimestr时间字符串
amsg日志消息

The documentation for this class was generated from the following files: