![]() |
C++客户端开发接口库 V5.1.8.15
连接信创集成中间件服务程序的二次开发接口
|
#include <LogQueue.h>
Public 成员函数 | |
| void | Push (LOGLEVEL Level, const std::string &sFunctionName, const std::list< std::string > &lstMsg) |
| void | Push (LOGLEVEL Level, const std::string &sFunctionName, const std::string &sLogMsg) |
| void | Push (LOGLEVEL Level, const std::string &sFunctionName, const char *fmt,...) |
| void | PushError (const std::string &sFunctionName, const std::string &sLogMsg) |
| void | PushError (const std::string &sFunctionName, const char *fmt,...) |
| void | PushWarning (const std::string &sFunctionName, const std::string &sLogMsg) |
| void | PushWarning (const std::string &sFunctionName, const char *fmt,...) |
| void | Push (const std::string &sFunctionName, const std::exception &ex) |
| bool | Pop (MDWLogMsg &logmsg) |
| bool | WriteFinished () |
| CLogQueue () | |
| ~CLogQueue () | |
日志队列类,用于管理日志消息的存储和检索
| mdwc::CLogQueue::CLogQueue | ( | ) |
构告函数
| mdwc::CLogQueue::~CLogQueue | ( | ) |
析构函数
| bool mdwc::CLogQueue::Pop | ( | MDWLogMsg & | logmsg | ) |
从队列中取出最早的日志消息. /param logmsg 用于存储取出的日志消息 /return 如果成功取出日志消息返回true,队列为空返回false
| void mdwc::CLogQueue::Push | ( | const std::string & | sFunctionName, |
| const std::exception & | ex ) |
添加异常信息到日志队列. /param sFunctionName 执行函数名称 /param ex 异常对象
| void mdwc::CLogQueue::Push | ( | LOGLEVEL | Level, |
| const std::string & | sFunctionName, | ||
| const char * | fmt, | ||
| ... ) |
添加单条日志消息到队列. /param Level 日志级别 /param sFunctionName 执行函数名称 /param fmt 字符串格式化内容

| void mdwc::CLogQueue::Push | ( | LOGLEVEL | Level, |
| const std::string & | sFunctionName, | ||
| const std::list< std::string > & | lstMsg ) |
添加日志消息到队列. /param Level 日志级别 /param sFunctionName 执行函数名称 /param lstMsg 日志消息列表

| void mdwc::CLogQueue::Push | ( | LOGLEVEL | Level, |
| const std::string & | sFunctionName, | ||
| const std::string & | sLogMsg ) |
添加单条日志消息到队列. /param Level 日志级别 /param sFunctionName 执行函数名称 /param sLogMsg 日志内容
| void mdwc::CLogQueue::PushError | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加错误信息到日志队列. /param sFunctionName 执行函数名称 /param fmt 字符串格式化内容

| void mdwc::CLogQueue::PushError | ( | const std::string & | sFunctionName, |
| const std::string & | sLogMsg ) |
添加错误信息到日志队列. /param sFunctionName 执行函数名称 /param sLogMsg 日志内容


| void mdwc::CLogQueue::PushWarning | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加警告信息到日志队列 /param sFunctionName 执行函数名称 /param fmt 字符串格式化内容

| void mdwc::CLogQueue::PushWarning | ( | const std::string & | sFunctionName, |
| const std::string & | sLogMsg ) |
添加警告信息到日志队列 /param sFunctionName 执行函数名称 /param sLogMsg 日志内容


| bool mdwc::CLogQueue::WriteFinished | ( | ) |
检查所有日志是否已写入文件完成. /return 如果队列为空(所有日志已处理)返回true,否则返回false