![]() |
C++客户端开发接口库 V5.1.8.15
连接信创集成中间件服务程序的二次开发接口
|
#include <AppLogger.h>
Public 成员函数 | |
| void | TruncateLogFile () |
| void | EnabledDebugLog (bool bEnabled) |
| bool | IsEnabledDebugLog () const |
| void | WriteLog (const std::string &sFunctionName, const std::string &sLogMsg) |
| void | WriteLog (const std::string &sFunctionName, const char *fmt,...) |
| void | WriteDebug (const std::string &sFunctionName, const std::string &sLogMsg) |
| void | WriteDebug (const std::string &sFunctionName, const char *fmt,...) |
| void | WriteDebugCompile (const std::string &sFunctionName, const char *fmt,...) |
| void | WriteErrorLog (const std::string &sFunctionName, const std::string &sLogMsg) |
| void | WriteErrorLog (const std::string &sFunctionName, const char *fmt,...) |
| void | WriteWaringLog (const std::string &sFunctionName, const std::string &sLogMsg) |
| void | WriteWaringLog (const std::string &sFunctionName, const char *fmt,...) |
| void | WriteExceptionLog (const std::string &sFunctionName, const std::exception &ex) |
| std::string | GetLastLogMessage () |
| void | StartAppLogger () |
| void | StopAppLogger () |
| void | OpenLogFile () |
| void | ClearLogFile () |
| CAppLogger (const std::string &sAppIdentity, const std::string &sWorkDirectory="", int iLogFileRetentionDays=100) | |
| ~CAppLogger () | |
显示和保存应用程序运行日志,要手工实例化或释放.
| CAppLogger::CAppLogger | ( | const std::string & | sAppIdentity, |
| const std::string & | sWorkDirectory = "", | ||
| int | iLogFileRetentionDays = 100 ) |
构造函数
| sAppIdentity | 应用程序标识 |
| sWorkDirectory | 工作文件夹用于创建日志 |
| iLogFileRetentionDays | 日志文件保留天数 |

| CAppLogger::~CAppLogger | ( | ) |
释放资源关闭文件

| void CAppLogger::ClearLogFile | ( | ) |
清除当前日志文件,如果还有日志信息会自动重新创建文件
|
inline |
设置写入调试日志标志
|
inline |
|
inline |
获取写入调试日志标志
| void CAppLogger::OpenLogFile | ( | ) |
用记事本打开当前日志文件
| void CAppLogger::StartAppLogger | ( | ) |
启动日志保存线程.
| void CAppLogger::StopAppLogger | ( | ) |
停止日志保存线程


| void CAppLogger::TruncateLogFile | ( | ) |
截断日志文件,清除数据
| void CAppLogger::WriteDebug | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加调试信息到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| fmt | 字符串格式化内容 |

| void CAppLogger::WriteDebug | ( | const std::string & | sFunctionName, |
| const std::string & | sLogMsg ) |
添加调试信息到日志队列.
| sFunctionName | 执行函数名称 |
| sLogMsg | 日志内容 |

| void CAppLogger::WriteDebugCompile | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加在调试编译下有效的信息到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| fmt | 字符串格式化内容 |

| void CAppLogger::WriteErrorLog | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加错误信息到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| fmt | 字符串格式化内容 |

| void CAppLogger::WriteErrorLog | ( | const std::string & | sFunctionName, |
| const std::string & | sLogMsg ) |
添加错误信息到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| sLogMsg | 日志内容 |

| void CAppLogger::WriteExceptionLog | ( | const std::string & | sFunctionName, |
| const std::exception & | ex ) |
添加异常到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| ex | 异常错误信息 |
| void CAppLogger::WriteLog | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加到日志队列.
| sFunctionName | 执行函数名称 |
| fmt | 字符串格式化内容 |

| void CAppLogger::WriteLog | ( | const std::string & | sFunctionName, |
| const std::string & | sLogMsg ) |
添加到日志队列.
| sFunctionName | 执行函数名称 |
| sLogMsg | 日志内容 |

| void CAppLogger::WriteWaringLog | ( | const std::string & | sFunctionName, |
| const char * | fmt, | ||
| ... ) |
添加警告信息到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| fmt | 字符串格式化内容 |

| void CAppLogger::WriteWaringLog | ( | const std::string & | sFunctionName, |
| const std::string & | sLogMsg ) |
添加警告信息到日志队列.
| sFunctionName | 当前执行函数名称或功能名称 |
| sLogMsg | 日志内容 |
