FFL
1.0
Finfly Foundation Library
|
00001 /* $Id: logbook.h 2654 2011-11-01 21:59:44Z roma $ */ 00002 #ifndef _LOGBOOK_H_ 00003 #define _LOGBOOK_H_ 00004 00005 #include "failure.h" 00006 00007 namespace ffl 00008 { 00009 00010 namespace cssc 00011 { 00012 00013 /* \brief Журнал потока. */ 00014 class logbook 00015 { 00016 public: 00017 00026 logbook(const char* _file) throw(...); 00027 00034 logbook() throw():Log(NULL){} 00035 00037 ~logbook() 00038 { 00039 if(Log) 00040 fclose(Log); 00041 } 00042 00051 void timestamp(const char* _format, ...) throw(); 00052 00061 void write(const char* _format, ...) throw(); 00062 00063 void write(const ipc::socket::address::info& _info) throw(); 00064 00065 void write(const ipc::socket::address& _a) throw(...); 00066 00067 void write(const ipc::socket& _s) throw(...); 00068 00069 void write(const cssc::failure& _x) throw(); 00070 00071 private: 00072 00073 FILE* Log; 00074 00075 }; 00076 00077 } 00078 00079 } 00080 00081 #endif