00001 00007 #ifndef SYSLOG_H 00008 #define SYSLOG_H 00009 00010 #include <stdio.h> 00011 00012 class SysLog { 00013 00014 protected: 00018 SysLog(); 00019 00023 ~SysLog(); 00024 00025 public: 00029 enum Status { 00031 OPEN = 1, 00033 CLOSED = 0, 00035 RECORDING = 2, 00037 ERROR = -1 00038 00039 }; 00040 00046 int openSysLog(); 00047 00053 int closeSysLog(); 00054 00061 int copySysLog(char * newFile); 00062 00068 int sysLogWrite(char * message); 00069 00074 char * getSysLogName(); 00075 00080 struct tm *logTime; 00081 00086 static SysLog * theInstance(); 00087 00092 int getfd(); 00093 00094 private: 00096 static SysLog * instance; 00097 00099 char * sysLogName; 00100 00102 static int sysLogHandle; 00103 00105 static Status LogStatus; 00106 }; 00107 00108 #endif
1.3.6