00001 #ifndef SCTAPI_LOG_H
00002 #define SCTAPI_LOG_H
00003
00004 #include <fstream>
00005 #include <string>
00006 #include <boost/thread.hpp>
00007
00008 namespace SctApi {
00013 class Log : public std::ofstream {
00014 public:
00016 Log();
00018 Log(std::string fname);
00020 Log(std::string fname, int instance);
00021
00023 ~Log();
00024 boost::mutex & mutex() { return m_logMutex; };
00025 private:
00026 static std::string getDefaultFileName();
00027 void printHeader();
00028 void printTrailer();
00029
00030 boost::mutex m_logMutex;
00031 };
00032
00033 }
00034
00035 #endif