dl
类 | 命名空间 | 宏定义 | 函数 | 变量
dl_log.h 文件参考

日志系统 更多...

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

浏览源代码.

类

class  dl::LogSystem
 
struct  dl::LogSystem::Setting
 
class  dl::LogLimit
 

命名空间

namespace  dl
 

宏定义

#define log_(str, ...)   log(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_pause(str, ...)   log_pause0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_test(str, ...)   log_test0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_info(str, ...)   log_info0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_msg(str, ...)   log_msg0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_notice(str, ...)   log_notice0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_warn(str, ...)   log_warn0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_err(str, ...)   log_err0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_damage(str, ...)   log_damage0(fmt::format(str, __VA_ARGS__), std::source_location::current())
 
#define log_(str, ...)   log(fmt::format(str, __VA_ARGS__))
 
#define log_pause(str, ...)   log_pause0(fmt::format(str, __VA_ARGS__))
 
#define log_test(str, ...)   log_test0(fmt::format(str, __VA_ARGS__))
 
#define log_info(str, ...)   log_info0(fmt::format(str, __VA_ARGS__))
 
#define log_msg(str, ...)   log_msg0(fmt::format(str, __VA_ARGS__))
 
#define log_notice(str, ...)   log_notice0(fmt::format(str, __VA_ARGS__))
 
#define log_warn(str, ...)   log_warn0(fmt::format(str, __VA_ARGS__))
 
#define log_err(str, ...)   log_err0(fmt::format(str, __VA_ARGS__))
 
#define log_damage(str, ...)   log_damage0(fmt::format(str, __VA_ARGS__))
 

函数

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 (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_ (   str,
  ... 
)    log(fmt::format(str, __VA_ARGS__), std::source_location::current())

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

◆ log_ [2/2]

#define log_ (   str,
  ... 
)    log(fmt::format(str, __VA_ARGS__))

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

◆ log_damage [1/2]

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

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

◆ log_damage [2/2]

#define log_damage (   str,
  ... 
)    log_damage0(fmt::format(str, __VA_ARGS__))

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

◆ log_err [1/2]

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

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

◆ log_err [2/2]

#define log_err (   str,
  ... 
)    log_err0(fmt::format(str, __VA_ARGS__))

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

◆ log_info [1/2]

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

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

◆ log_info [2/2]

#define log_info (   str,
  ... 
)    log_info0(fmt::format(str, __VA_ARGS__))

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

◆ log_msg [1/2]

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

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

◆ log_msg [2/2]

#define log_msg (   str,
  ... 
)    log_msg0(fmt::format(str, __VA_ARGS__))

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

◆ log_notice [1/2]

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

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

◆ log_notice [2/2]

#define log_notice (   str,
  ... 
)    log_notice0(fmt::format(str, __VA_ARGS__))

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

◆ log_pause [1/2]

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

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

◆ log_pause [2/2]

#define log_pause (   str,
  ... 
)    log_pause0(fmt::format(str, __VA_ARGS__))

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

◆ log_test [1/2]

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

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

◆ log_test [2/2]

#define log_test (   str,
  ... 
)    log_test0(fmt::format(str, __VA_ARGS__))

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

◆ log_warn [1/2]

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

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

◆ log_warn [2/2]

#define log_warn (   str,
  ... 
)    log_warn0(fmt::format(str, __VA_ARGS__))

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