首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > C++日志操作类

C++日志操作类

  • 资源大小:2.29 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: c++,log,日志

资 源 简 介

用C++简单封装的一个写日志的类,方便于跟踪程序,查找问题。 采用C++代码,适用多字节项目,使用简单方便。 在头文件中定义了一些实用宏,如定义了写日志的宏,要向关闭写日志的功能,只需将这样的宏定义为空即可。 头文件部分代码如下: class CSimpleLog { public: CSimpleLog(char *path); ~CSimpleLog(); bool writelog(char *pmsg); bool writelogx(char *format,...); static bool write(char *path,char *info); static bool writex(char * path,char * info,...); private: //DWORD time; std::string last_msg; FILE *file; //日志文件 int msg_dup_count; bool isopen; }; #ifndef THIS_WRITELOG #define THIS_WRITELOG(s) pThis->m_log.writelog(s) #endif #ifndef WRITELOG #define WRITELOG(s) m_log.writelog(s) #endif #ifndef THIS_WRITELOG_  #define THIS_WRITELOG_(s) pThis->m_log.writelog(s); #endif #ifndef WRITELOG_ #define W

文 件 列 表

SimpleLog.cpp
SimpleLog.h
VIP VIP
  • 大智若愚 22分钟前 成为了本站会员

  • Mason 2小时前 成为了本站会员

  • 3小时前 成为了本站会员

  • Half_Punch 1天前 成为了本站会员

  • liqing71718 1天前 成为了本站会员

  • 伟国 1天前 成为了本站会员

  • songy 1天前 成为了本站会员

  • 纯色幽默 1天前 成为了本站会员

  • odd? 1天前 成为了本站会员

  • 52JOY... 1天前 成为了本站会员

0.167794s