⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 log.h

📁 基于domino系统邮件数据库编写的邮件助手程序
💻 H
字号:
// Log.h: interface for the CLog class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LOG_H__3FD3B9A9_ABAA_40B9_98CE_2A8B838E69FD__INCLUDED_)
#define AFX_LOG_H__3FD3B9A9_ABAA_40B9_98CE_2A8B838E69FD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//#include <stdio.h>
//#include <iostream.h>
#include <fstream.h>
//#include <time.h>

const LOG_LEVEL_ACT = 1;	//action
const LOG_LEVEL_AER = 2;	//act error
const LOG_LEVEL_CER = 3;	//code error

class CLog
{
public:
	CLog();
	virtual ~CLog();

	static void WriteLine( const char* szMsg );
	static void WriteLine( const char* szMsg, int nLine, const char* szFileName );
	static void WriteLine( long dw, const char* szMsg=NULL );

protected:
	static CLog m_oLog;

	//日志文件路径
	char m_strLogFilePath[MAX_PATH];
	//日志文件句柄
	ofstream* m_objptrOfstream;

	void initFile();
	void closeFile();

	void writeTime();
	void write( const char* szMsg );
	void writeLine( const char* szMsg );
};


#endif // !defined(AFX_LOG_H__3FD3B9A9_ABAA_40B9_98CE_2A8B838E69FD__INCLUDED_)

⌨️ 快捷键说明

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