git.stg.codes
/
stg.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
More correct way to use printf
[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