rpcsx/rpcs3/Emu/ConLog.h
Peter Tissen 40add8f9a2 Seperate ConLog.h and ConLogFrame.h (for now only seperate headers)
make precompiled header slimmer under Linux to increase CI and dev-machine build-times

make sure unused modules don't compile
add unused modules to the VS project to easier keep track of them
2014-06-06 02:50:22 +02:00

51 lines
1.1 KiB
C++

#pragma once
#include <wx/listctrl.h>
#include "Ini.h"
#include "Gui/FrameBase.h"
class LogWriter
{
wxFile m_logfile;
wxColour m_txtcolour;
//wxString m_prefix;
//wxString m_value;
void WriteToLog(const std::string& prefix, const std::string& value, u8 lvl);
public:
LogWriter();
template <typename ...Arg>
void Write(const std::string &fmt, Arg&&... args)
{
std::string frmt = fmt::Format(fmt, std::forward<Arg>(args)...);
WriteToLog("!", frmt, 2);
}
template <typename ...Arg>
void Error(const std::string &fmt, Arg&&... args)
{
std::string frmt = fmt::Format(fmt, std::forward<Arg>(args)...);
WriteToLog("E", frmt, 4);
}
template <typename ...Arg>
void Warning(const std::string &fmt, Arg&&... args)
{
std::string frmt = fmt::Format(fmt, std::forward<Arg>(args)...);
WriteToLog("W", frmt, 3);
}
template <typename ...Arg>
void Success(const std::string &fmt, Arg&&... args)
{
std::string frmt = fmt::Format(fmt, std::forward<Arg>(args)...);
WriteToLog("S", frmt, 1);
}
virtual void SkipLn();
};
extern LogWriter ConLog;