logger.h

来自「J-Alice是一个用C++实现的Ailcebot的克隆。它可以做为一个mini」· C头文件 代码 · 共 30 行

H
30
字号
#ifndef LOGGER_H
#define LOGGER_H

#include <string>
#include <fstream>

using namespace std;

class Logger
{
public:
	Logger() {
	}
	
	~Logger() {
	}
	
	static void log(const string &msg, int logType);
	static void log(const string &msg, const string &file);

	static const int ERROR;
	static const int DEBUG;
	
	static string timestamp();
private:
	static bool openLog(fstream &file, const string &name);
	static void closeLog(fstream &file);
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?