2018-05-25 12:37:18 -04:00
|
|
|
#pragma once
|
2007-11-22 19:49:07 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
2012-12-24 15:47:47 +00:00
|
|
|
#include <boost/filesystem.hpp>
|
2007-11-22 19:49:07 +00:00
|
|
|
#include "StdStream.h"
|
|
|
|
#include "Singleton.h"
|
|
|
|
|
|
|
|
class CLog : public CSingleton<CLog>
|
|
|
|
{
|
|
|
|
public:
|
2018-04-30 21:01:23 +01:00
|
|
|
CLog();
|
2018-05-22 20:36:56 -04:00
|
|
|
virtual ~CLog() = default;
|
2013-09-22 05:37:48 +00:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
void Print(const char*, const char*, ...);
|
2018-05-24 12:54:10 -04:00
|
|
|
void Warn(const char*, const char*, ...);
|
2007-11-22 19:49:07 +00:00
|
|
|
|
|
|
|
private:
|
2012-12-24 15:47:47 +00:00
|
|
|
typedef std::map<std::string, Framework::CStdStream> LogMapType;
|
2007-11-22 19:49:07 +00:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
Framework::CStdStream& GetLog(const char*);
|
2007-11-22 19:49:07 +00:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
boost::filesystem::path m_logBasePath;
|
|
|
|
LogMapType m_logs;
|
2018-05-25 12:37:10 -04:00
|
|
|
bool m_showPrints = false;
|
2007-11-22 19:49:07 +00:00
|
|
|
};
|