rpcsx/rpcs3/Emu/SysCalls/LogBase.cpp

32 lines
1.1 KiB
C++
Raw Normal View History

2014-08-22 16:58:50 +02:00
#include "stdafx.h"
2014-08-23 02:16:54 +02:00
#include "rpcs3/Ini.h"
2014-08-22 16:58:50 +02:00
#include "Utilities/Log.h"
2014-08-22 23:15:02 +02:00
#include "Emu/System.h"
2014-08-22 16:58:50 +02:00
#include "LogBase.h"
2014-08-22 23:15:02 +02:00
bool LogBase::CheckLogging() const
{
return Ini.HLELogging.GetValue();
}
2014-08-23 16:51:51 +02:00
void LogBase::LogOutput(LogType type, const char* info, const std::string& text)
2014-08-22 16:58:50 +02:00
{
2014-08-23 16:51:51 +02:00
switch (type)
{
case LogNotice: LOG_NOTICE(HLE, "%s%s%s", GetName().c_str(), info, text.c_str()); break;
case LogSuccess: LOG_SUCCESS(HLE, "%s%s%s", GetName().c_str(), info, text.c_str()); break;
case LogWarning: LOG_WARNING(HLE, "%s%s%s", GetName().c_str(), info, text.c_str()); break;
case LogError: LOG_ERROR(HLE, "%s%s%s", GetName().c_str(), info, text.c_str()); break;
}
2014-08-22 16:58:50 +02:00
}
2014-08-23 16:51:51 +02:00
void LogBase::LogOutput(LogType type, const u32 id, const char* info, const std::string& text)
2014-08-22 16:58:50 +02:00
{
2014-08-23 16:51:51 +02:00
switch (type)
{
case LogNotice: LOG_NOTICE(HLE, "%s[%d]%s%s", GetName().c_str(), id, info, text.c_str()); break;
case LogSuccess: LOG_SUCCESS(HLE, "%s[%d]%s%s", GetName().c_str(), id, info, text.c_str()); break;
case LogWarning: LOG_WARNING(HLE, "%s[%d]%s%s", GetName().c_str(), id, info, text.c_str()); break;
case LogError: LOG_ERROR(HLE, "%s[%d]%s%s", GetName().c_str(), id, info, text.c_str()); break;
}
2014-08-22 16:58:50 +02:00
}