dl
dl::LogSystem类 参考

日志系统 更多...

#include <dl_log.h>

struct  Setting
 

Public 类型

enum class  Level {
  DAMAGE , ERR , WARN , NOTICE ,
  MSG , INFO , TEST , PAUSE
}
 日志等级 越小越严重 更多...
 

Public 成员函数

 LogSystem ()
 
const SettingGetSetting ()
 返回当前设置
 
void SetLogFile (std::string_view path, std::string_view name={}, bool clear=true)
 设置日志文件路径(非线程安全)
 
std::string GetLogFile ()
 
bool IsLevelLimit (Level level)
 
bool IsLevelMsgBox (Level level)
 检查等级是否可以弹窗(小于等于自己)
 
void SetLevelMsgBox (Level level)
 设置弹窗等级(小于等于自己才弹,越小越严重)
 
std::mutex & GetMutex ()
 

静态 Public 成员函数

static std::string_view Level2String (Level level)
 日志等级转字符串
 

友元

class LogLimit
 
class LogStackTrack
 
class LogLevelSet
 

详细描述

日志系统

在文件 dl_log.h76 行定义.

成员枚举类型说明

◆ Level

enum class dl::LogSystem::Level
strong

日志等级 越小越严重

枚举值
DAMAGE 
ERR 
WARN 
NOTICE 
MSG 
INFO 
TEST 
PAUSE 

在文件 dl_log.h83 行定义.

构造及析构函数说明

◆ LogSystem()

dl::LogSystem::LogSystem ( )

成员函数说明

◆ GetLogFile()

std::string dl::LogSystem::GetLogFile ( )
inline

在文件 dl_log.h119 行定义.

◆ GetMutex()

std::mutex & dl::LogSystem::GetMutex ( )
inline

在文件 dl_log.h143 行定义.

◆ GetSetting()

const Setting & dl::LogSystem::GetSetting ( )
inline

返回当前设置

在文件 dl_log.h104 行定义.

◆ IsLevelLimit()

bool dl::LogSystem::IsLevelLimit ( Level level)
inline

在文件 dl_log.h124 行定义.

◆ IsLevelMsgBox()

bool dl::LogSystem::IsLevelMsgBox ( Level level)
inline

检查等级是否可以弹窗(小于等于自己)

在文件 dl_log.h133 行定义.

◆ Level2String()

static std::string_view dl::LogSystem::Level2String ( Level level)
inlinestatic

日志等级转字符串

在文件 dl_log.h148 行定义.

◆ SetLevelMsgBox()

void dl::LogSystem::SetLevelMsgBox ( Level level)
inline

设置弹窗等级(小于等于自己才弹,越小越严重)

在文件 dl_log.h138 行定义.

◆ SetLogFile()

void dl::LogSystem::SetLogFile ( std::string_view path,
std::string_view name = {},
bool clear = true )

设置日志文件路径(非线程安全)

参数
[in]path日志文件夹(为空时不生成)
[in]name日志名(为空时自动取名)
[in]clear清空文件内容
注解
允许在Engine::Init之前调用

友元及相关符号说明

◆ LogLevelSet

friend class LogLevelSet
friend

在文件 dl_log.h80 行定义.

◆ LogLimit

friend class LogLimit
friend

在文件 dl_log.h78 行定义.

◆ LogStackTrack

friend class LogStackTrack
friend

在文件 dl_log.h79 行定义.


该类的文档由以下文件生成: