rpcsx/rpcs3/Emu/SysCalls/LogBase.cpp

23 lines
625 B
C++
Raw Normal View History

2014-08-22 18:58:50 +04:00
#include "stdafx.h"
2014-08-23 04:16:54 +04:00
#include "rpcs3/Ini.h"
2014-08-22 18:58:50 +04:00
#include "Utilities/Log.h"
2014-08-23 01:15:02 +04:00
#include "Emu/System.h"
2014-08-22 18:58:50 +04:00
#include "LogBase.h"
2014-08-23 01:15:02 +04:00
bool LogBase::CheckLogging() const
{
2014-09-30 02:28:02 +04:00
return Ini.HLELogging.GetValue() || m_logging;
2014-08-23 01:15:02 +04:00
}
void LogBase::LogOutput(LogType type, std::string text) const
2014-08-22 18:58:50 +04:00
{
2014-08-23 18:51:51 +04:00
switch (type)
{
case LogNotice: LOG_NOTICE(HLE, GetName() + ": " + text); break;
case LogSuccess: LOG_SUCCESS(HLE, GetName() + ": " + text); break;
case LogWarning: LOG_WARNING(HLE, GetName() + ": " + text); break;
case LogError: LOG_ERROR(HLE, GetName() + ": " + text); break;
case LogTodo: LOG_ERROR(HLE, GetName() + " TODO: " + text); break;
2014-09-08 18:56:47 +04:00
}
}