dl
dl_log.h 文件参考

日志系统 更多...

#include <string>
#include <iostream>
#include <stack>
#include <array>
#include <mutex>
#include "system/dl_platform.h"
#include <stacktrace>
#include <source_location>
#include <fmt/format.h>

浏览该文件的源代码.

类

class  dl::LogSystem
 日志系统 更多...
 
struct  dl::LogSystem::Setting
 
class  dl::LogLimit
 日志打印限制 更多...
 
class  dl::LogStackTrack
 日志打开调用堆栈 更多...
 

命名空间

namespace  dl
 

宏定义

#define log_(...)
 
#define log_pause(...)
 
#define log_test(...)
 
#define log_info(...)
 
#define log_msg(...)
 
#define log_notice(...)
 
#define log_warn(...)
 
#define log_err(...)
 
#define log_damage(...)
 
#define log_(...)
 
#define log_pause(...)
 
#define log_test(...)
 
#define log_info(...)
 
#define log_msg(...)
 
#define log_notice(...)
 
#define log_warn(...)
 
#define log_err(...)
 
#define log_damage(...)
 

函数

void dl::log_easy (std::string_view str)
 输出日志
 
void dl::log_pause0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_test0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_info0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_msg0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_notice0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_warn0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_err0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log_damage0 (std::string_view str, const std::source_location location=std::source_location::current())
 
void dl::log (std::string_view str, const std::source_location location=std::source_location::current())
 以当前设置输出
 
void dl::log_err0 (const std::exception &e, const std::source_location location=std::source_location::current())
 
void dl::log_err0 (const std::system_error &e, const std::source_location location=std::source_location::current())
 
void dl::log (std::string_view str)
 
void dl::log_pause0 (std::string_view str)
 
void dl::log_test0 (std::string_view str)
 
void dl::log_info0 (std::string_view str)
 
void dl::log_msg0 (std::string_view str)
 
void dl::log_notice0 (std::string_view str)
 
void dl::log_warn0 (std::string_view str)
 
void dl::log_err0 (std::string_view str)
 
void dl::log_damage0 (std::string_view str)
 
void dl::log_err0 (const std::exception &e)
 

变量

constexpr std::array< std::string_view, 9 > dl::DL_LOG_SYSTEM_LEVLE_NAME
 
LogSystem * dl::g_log
 

详细描述

日志系统

版本
1.0
作者
lveyou
日期
23-06-22
注解

在文件 dl_log.h 中定义.

宏定义说明

◆ log_ [1/2]

#define log_ ( ...)
值:
log(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 224 行定义.

◆ log_ [2/2]

#define log_ ( ...)
值:
log(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 224 行定义.

◆ log_damage [1/2]

#define log_damage ( ...)
值:
log_damage0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 232 行定义.

◆ log_damage [2/2]

#define log_damage ( ...)
值:
log_damage0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 232 行定义.

◆ log_err [1/2]

#define log_err ( ...)
值:
log_err0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 231 行定义.

◆ log_err [2/2]

#define log_err ( ...)
值:
log_err0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 231 行定义.

◆ log_info [1/2]

#define log_info ( ...)
值:
log_info0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 227 行定义.

◆ log_info [2/2]

#define log_info ( ...)
值:
log_info0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 227 行定义.

◆ log_msg [1/2]

#define log_msg ( ...)
值:
log_msg0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 228 行定义.

◆ log_msg [2/2]

#define log_msg ( ...)
值:
log_msg0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 228 行定义.

◆ log_notice [1/2]

#define log_notice ( ...)
值:
log_notice0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 229 行定义.

◆ log_notice [2/2]

#define log_notice ( ...)
值:
log_notice0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 229 行定义.

◆ log_pause [1/2]

#define log_pause ( ...)
值:
log_pause0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 225 行定义.

◆ log_pause [2/2]

#define log_pause ( ...)
值:
log_pause0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 225 行定义.

◆ log_test [1/2]

#define log_test ( ...)
值:
log_test0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 226 行定义.

◆ log_test [2/2]

#define log_test ( ...)
值:
log_test0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 226 行定义.

◆ log_warn [1/2]

#define log_warn ( ...)
值:
log_warn0(fmt::format(__VA_ARGS__), std::source_location::current())

在文件 dl_log.h 第 230 行定义.

◆ log_warn [2/2]

#define log_warn ( ...)
值:
log_warn0(fmt::format(__VA_ARGS__))

在文件 dl_log.h 第 230 行定义.