logger.h
1.48 KB
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
52
53
/***************************************************************************
* Universidade Federal da Paraíba *
* Copyright (C) 2014 by Laboratório de Aplicações de Vídeo Digital *
* *
* Centro de Informática - UFPB - Campus I *
* João Pessoa - PB - Brasil *
* *
* Author: Erickson Silva (erickson.silva@lavid.ufpb.br) *
* *
**************************************************************************/
#include <iostream>
#include <fstream>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <iostream>
#include <ctime>
//#include <lavidlib/utils/Logger.h>
#ifndef _LOGGER_H_
#define _LOGGER_H_
using namespace std;
namespace Util {
class Logger {
public:
static Logger* Instance();
void openLogFile();
void writeLog(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