]> git.stg.codes - stg.git/blob - projects/traffcounter/logger.h
Added specialization for unsigned in, long and unsigned long types
[stg.git] / projects / traffcounter / logger.h
1 #ifndef __LOGGER_H__
2 #define __LOGGER_H__
3
4 #include <iostream>
5 #include <string>
6
7 #define LOG_IT (log << __FILE__ << ":" << __LINE__ << " ")
8
9 class STGLogger {
10 public:
11     STGLogger() : out(std::cout) {};
12     STGLogger(std::ostream & stream) : out(stream) {};
13     ~STGLogger();
14
15     std::ostream &operator <<(const std::string & val);
16 private:
17     void LogDate();
18     std::ostream & out;
19 };
20
21 extern STGLogger log;
22
23 #endif