Play-/Source/Log.h

27 lines
538 B
C
Raw Normal View History

2018-05-25 12:37:18 -04:00
#pragma once
#include <string>
#include <map>
#include <boost/filesystem.hpp>
#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;
2018-04-30 21:01:23 +01:00
void Print(const char*, const char*, ...);
void Warn(const char*, const char*, ...);
private:
typedef std::map<std::string, Framework::CStdStream> LogMapType;
2018-04-30 21:01:23 +01:00
Framework::CStdStream& GetLog(const char*);
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;
};