logger.h
892 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
45
46
47
48
49
50
51
/*
* ReconhecedorSaldo.java
* Created on 11 de Junho de 2007, 14:21, by giuliano
*
* parseNumbers.cpp
* Convertido para C++ em:
* @date 21/10/2009
* @author Derzu Omaia
*
*/
#include <iostream>
#include <fstream>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <iostream>
#include <ctime>
#ifndef _LOGGER_H_
#define _LOGGER_H_
using namespace std;
namespace Util {
class Logger {
public:
static Logger* Instance();
void openLogFile();
void writeLogFile(char* exception);
void closeLogFile();
char* getTime();
private:
Logger() ; // Private so that it can not be called
Logger(Logger const&){}; // copy constructor is private
Logger& operator=(Logger const&){}; // assignment operator is private
static Logger* m_pInstance;
ofstream file;
};
}
#endif