28 lines
470 B
C++
28 lines
470 B
C++
#ifndef OG_LOG_H_
|
|
#define OG_LOG_H_
|
|
|
|
#include <cstdio>
|
|
#include <string>
|
|
#include "pc/commcode.h"
|
|
|
|
class Logger {
|
|
public:
|
|
Logger *getInstance() const;
|
|
|
|
void debug(const std::string &) const;
|
|
void info(const std::string &) const;
|
|
void warn(const std::string &) const;
|
|
void error(const std::string &) const;
|
|
void fatal(const std::string &) const;
|
|
|
|
private:
|
|
Logger();
|
|
void _log(LogLevel v, const std::string &) const;
|
|
|
|
LogLevel filter;
|
|
};
|
|
|
|
Logger *Log();
|
|
|
|
#endif
|