-
Notifications
You must be signed in to change notification settings - Fork 1
/
Log.h
42 lines (37 loc) · 852 Bytes
/
Log.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**********************************
* FILE NAME: Log.h
*
* DESCRIPTION: Header file of Log class
**********************************/
#ifndef _LOG_H_
#define _LOG_H_
#include "stdincludes.h"
#include "Params.h"
#include "Member.h"
/*
* Macros
*/
// number of writes after which to flush file
#define MAXWRITES 1
#define MAGIC_NUMBER "CS425"
#define DBG_LOG "dbg.log"
#define STATS_LOG "stats.log"
/**
* CLASS NAME: Log
*
* DESCRIPTION: Functions to log messages in a debug log
*/
class Log{
private:
Params *par;
bool firstTime;
public:
Log(Params *p);
Log(const Log &anotherLog);
Log& operator = (const Log &anotherLog);
virtual ~Log();
void LOG(Address *, const char * str, ...);
void logNodeAdd(Address *, Address *);
void logNodeRemove(Address *, Address *);
};
#endif /* _LOG_H_ */