-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebugLog.h
More file actions
44 lines (34 loc) · 866 Bytes
/
Copy pathdebugLog.h
File metadata and controls
44 lines (34 loc) · 866 Bytes
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
43
44
/*
* DebugLog.h
*
* $Id$
*
* class doc here
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
class DebugLog
{
public:
static DebugLog *instance()
{ if( !m_instance ) m_instance = new DebugLog(); return m_instance; }
static void openLog();
static void openLog( const string &filename );
static void beginTask( const string &taskName );
static void endTask();
static void writeToLog( const string &msg );
/*static void writeToLog( const string &msg, const string &p1 );
static void writeToLog( const string &msg, long p1 );
static void writeToLog( const string &msg, double p1 );*/
static void closeLog();
protected:
DebugLog();
static DebugLog *m_instance;
private:
ofstream m_outfile;
int m_level;
void printTabs();
};