You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
832B

  1. #pragma once
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <stdarg.h>
  5. #include <ctype.h>
  6. typedef void LOGCALLBACK ( void *pClass, char *str );
  7. //-------------------------------------------------------------
  8. //-------------------------------------------------------------
  9. class CLog
  10. {
  11. public:
  12. CLog();
  13. ~CLog();
  14. LOGCALLBACK *m_LogCallbackFunc;
  15. void *m_pCallbackClass;
  16. int m_LogLevel;
  17. void SetCallback ( LOGCALLBACK *func, void *pClass );
  18. void f ( std::string string, ...);
  19. void fnr ( std::string string, ...);
  20. void mem ( unsigned char *pBuff, unsigned int dwSize, unsigned int dwOff );
  21. int Open ( std::string strFileName );
  22. void SetLogLvl ( int level );
  23. void Close ( void );
  24. private:
  25. FILE *fp;
  26. std::string buffer;
  27. };