-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogComm.h
More file actions
38 lines (28 loc) · 1.32 KB
/
LogComm.h
File metadata and controls
38 lines (28 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __LOGCOMM_H__
#define __LOGCOMM_H__
//
#include <util/tc_logger.h>
#include "servant/RemoteLogger.h"
//
using namespace tars;
//
#define ROLLLOG(level) (LOG->level() << "[" << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "] ")
#define ROLLLOG_DEBUG (ROLLLOG(debug))
#define ROLLLOG_INFO (ROLLLOG(info))
#define ROLLLOG_WARN (ROLLLOG(warn))
#define ROLLLOG_ERROR (ROLLLOG(error))
#define FUNC_ENTRY(in) (ROLLLOG(debug) << ">>>> Enter " << __FUNCTION__ << "() in(" << in << ")" << endl)
#define FUNC_EXIT(out, ret) (ROLLLOG(debug) << "<<<< Exit " << __FUNCTION__ << "() out[" << out << "], ret = " << ret << endl)
#define FDLOG_ERROR (FDLOG("error") << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "|")
#define FDLOG_EXCEPT (FDLOG("except") << __FILE__ << ":" << __LINE__ << ":" << __FUNCTION__ << "|")
//配置信息
#define FDLOG_CONFIG_INFO (FDLOG("config_info") << "|")
//用户注册日志
// #define ACCOUNT_REG_LOG_TOPIC "account_reg_log"
// #define FDLOG_ACCOUNT_REG_LOG (FDLOG("account_reg_log") << "|")
//
// #define FDLOG_INIT_FORMAT(x, y, z) (TarsTimeLogger::getInstance()->initFormatWithType<LogByMinute>(x, y, z))
// #define FDLOG_ACCOUNT_REG_LOG_FORMAT (FDLOG_INIT_FORMAT("account_reg_log", "%Y%m%d%H%M", 5))
//接口性能边界值
#define COST_MS 100
#endif