📄 logunit.h
字号:
/*
Copyright (C) 2001 Tsinghuaeolus
Authors : ChenJiang, YaoJinyi, CaiYunpeng, Lishi
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
If you make any changes or have any comments we would appreciate a
message to yjy01@mails.tsinghua.edu.cn.
*/
#ifndef _LogUnit
#define _LogUnit
#include "types.h"
#include "stdafx.h"
#include "stdio.h"
#include "netif.h"
class Log{
protected:
bool LogOn[32];
char logstring[2 * MAXMESG];
char header[100];
char logbuffer[5 * MAXMESG];
int logbuffer_len;
char label[32][16];
char logfilename[100];
SECURITY_ATTRIBUTES sa;
HANDLE hFile;
FILE* fp;
int logcount;
int maxlogcount;
bool filenameset;
bool LogLocked;
int LogCounts;
public:
Log(int maxlogcount = 10000000);
~Log();
void AssociateFile(char* filename);
void SetLogOn(int lognum);
void SetLogOff(int lognum);
void SetLabel(int lognum, char* caption);
void LogAction(int lognum,char*,...);
void LogAction(char*,...);
virtual void LogCore(int lognum,char*);
virtual bool CanLog(int lognum);
};
class LogData : public Log{
public:
void LogCore(int lognum, char *);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -