Skip to content
Snippets Groups Projects
Logger.h 496 B
Newer Older
  • Learn to ignore specific revisions
  • Radim Vavřík's avatar
    Radim Vavřík committed
    // Logger.h
    
    #ifndef LOGGER_H
    #define LOGGER_H
    
    #include <fstream>
    #include <ctime>
    
    namespace math1d_cl
    {
    	class Logger
    	{
    		public:
    			Logger();
    			Logger(Logger &origin);
    			Logger(int logTarget, std::string logFilePath);
    			~Logger();
    			void log(const std::string& text);
    
    		private:
    			std::ofstream m_logFile;
    			std::string m_logFilePath;
    			///
    			/// Target for logging: 0 for console, 1 for logFile, 2 for no output
    			///
    			int m_logTarget;
    	};
    }
    #endif