#pragma  once
#include <windows.h>
#include <process.h>
class  CLogger
{
public:
 static   CRITICAL_SECTION m_cs;//保证所有的对象都能访问到它
public:
 CLogger();
 ~CLogger();
 static int logger_to_file(const char* logfile);//加锁,放锁
 static  int logger(const char* fmt, ...);
 static  int close_logger_file();
private:
 static int log_ref;
 static FILE* logfp;
 
};


namespace  Logger
{
 int logger_to_file(const char* logfile);
 int logger(const char* fmt, ...);
 int close_logger_file();

 int log_ref;
 FILE* logfp;
}

 

 


 

相关文章:

  • 2021-08-17
  • 2022-12-23
  • 2021-06-20
  • 2021-12-02
  • 2022-12-23
  • 2022-03-06
  • 2021-12-17
猜你喜欢
  • 2022-02-12
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案