C_CPP/08_PTRN/Logger.hpp

20 lines
368 B
C++
Raw Normal View History

2018-03-09 09:47:53 +01:00
// file Logger.hpp
#ifndef Logger_hpp
#define Logger_hpp
#include <iostream>
class Logger {
static Logger* _theInstance;
public:
virtual void log(std::string message, std::string file="", int line=0) = 0;
static Logger* getInstance();
};
class StdoutLogger: public Logger {
public:
void log(std::string message, std::string file="", int line=0);
};
#endif