UnitreeCameraSDK  1.0.1
unitree stereo camra apis
SystemLog.hpp
Go to the documentation of this file.
1 
11 #ifndef __SYSTEMLOG_HPP__
12 #define __SYSTEMLOG_HPP__
13 
14 #include <stdarg.h>
15 #include <stdio.h>
16 #include <string>
17 
18 class SystemLog
19 {
20 private:
21  int m_logLevel;
22  bool m_isSave;
23  std::string m_logName;
24  std::string m_logFileName;
25 
26 public:
39  SystemLog(std::string logName);
40 
41 public:
54  void setLogLevel(int level);
68  void runTimeError(const char *format,...);
82  void runTimeInfo(const char *format,...);
96  void runTimeWarning(const char *format,...);
110  void debugTimeWarning(const char *format,...);
124  void debugTimeInfo(const char *format,...);
138  void debugTimeError(const char *format,...);
151  void saveLog(void);
164  void saveLogToFile(std::string fileName) ;
165 };
166 
167 
168 #endif //__SYSTEMLOG_HPP__
void saveLog(void)
save system log to a file, default file name: Running.txt
void setLogLevel(int level)
set system ouput log level
SystemLog(std::string logName)
SystemLog constructor.
void runTimeWarning(const char *format,...)
output running warning infomation, color: yellow
void runTimeInfo(const char *format,...)
output running infomation, color: green
void debugTimeInfo(const char *format,...)
output debug infomation, color: white
Definition: SystemLog.hpp:18
void runTimeError(const char *format,...)
output running error infomation, color: red
void debugTimeWarning(const char *format,...)
output debug warning infomation, color: cyan
void saveLogToFile(std::string fileName)
save system log to a designated file
void debugTimeError(const char *format,...)
output debug error infomation, color: magenta