📄 log.cpp
字号:
// log.cpp: implementation of the log class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "log.h"
#include <string.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
log* log::_instance=NULL;
log::log(const char* filename)
{
strcpy(this->Filename,filename);
}
log::~log()
{
}
log& log::instance()
{
if(_instance==NULL)
_instance=new log("trace.txt");
return (*_instance);
}
void log::dump(const char* filename,const char* line)
{
file.open(Filename,ios::app );
file<<"TRACE: "<<filename<<line<<endl;
file.close();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -