logger.h 1.48 KB
/***************************************************************************
 *   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