|
@ -1,45 +0,0 @@ |
|
|
#pragma once
|
|
|
|
|
|
#include <fstream>
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
#include <list>
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
#include <set>
|
|
|
|
|
|
#include <sstream>
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
#include "zwtimec/utils/marco_list.h"
|
|
|
|
|
|
#include "zwtimecpp/core/logger/logger.hpp"
|
|
|
|
|
|
#define LOG_CONFIG_BEGIN(name) \
|
|
|
|
|
|
{ \ |
|
|
|
|
|
string __logger_config__ = "\n-------------" #name "-----------\n"; |
|
|
|
|
|
#define LOG_CONFIG(value) \
|
|
|
|
|
|
__logger_config__ += fmt::format("- " #value ":{}\n", value); |
|
|
|
|
|
#define LOG_CONFIG_END() \
|
|
|
|
|
|
logger->info("{}\n-----------------------------", __logger_config__); \ |
|
|
|
|
|
} |
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @ LOG_FUNC |
|
|
|
|
|
*/ |
|
|
|
|
|
#define ZLOG_F_EACH(_1, _2, _3, _4, _5, index, expression) #expression ":{},"
|
|
|
|
|
|
|
|
|
|
|
|
#define ZLOG_F_VOID "VOID"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ZLOG_F_D(...) \
|
|
|
|
|
|
logger->debug("c {}(" MARCO_LIST(ZLOG_F_EACH, _1, _2, _3, _4, _5, __VA_ARGS__) ")", \ |
|
|
|
|
|
__FUNCTION__, __VA_ARGS__); |
|
|
|
|
|
|
|
|
|
|
|
#define ZLOG_F_I(...) \
|
|
|
|
|
|
logger->info("c {}(" MARCO_LIST(ZLOG_F_EACH, _1, _2, _3, _4, _5, __VA_ARGS__) ")", \ |
|
|
|
|
|
__FUNCTION__, __VA_ARGS__); |
|
|
|
|
|
|
|
|
|
|
|
#define ZLOG_F_E(...) \
|
|
|
|
|
|
logger->error("c {}(" MARCO_LIST(ZLOG_F_EACH, _1, _2, _3, _4, _5,__VA_ARGS__ ) ")", \ |
|
|
|
|
|
__FUNCTION__, __VA_ARGS__); |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|