logcontrol.h

来自「C++ patterns设计模式」· C头文件 代码 · 共 38 行

H
38
字号
#ifndef INCLUDED_LOGCONTROL_H
#define INCLUDED_LOGCONTROL_H

#if defined(HAS_PRAGMA_ONCE)
#pragma PRAGMA_ONCE_DECLARE
#endif

#include "patterns/util/noncopyable.h"

class TLog;
namespace stk
{	
	class LogControl : stk::noncopyable
	{
	public:
		LogControl();
		~LogControl();
		void enableTrace(const char *traceFile);
		void disableTrace();
		void trace(int id, const char *fmt, ...);
		void traceBinary(int id, const char *title, const char *binary, int length);
		void flush();

	private:
		TLog *m_logger;
	};
};

// for suntek name standard
typedef stk::LogControl CTLogControl;

//////////////////////////////////////////////////////////////////////////
// Change Log:
// 2004-12-19 by Darkay Li
//     add flush method, flush the log buffer (if any)

#endif

⌨️ 快捷键说明

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