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
|
|
|
|
|
{
|
2014-09-30 00:28:02 +02:00
|
|
|
return Ini.HLELogging.GetValue() || m_logging;
|
2014-08-22 23:15:02 +02:00
|
|
|
}
|
|
|
|
|
|
2015-01-18 23:54:56 +01:00
|
|
|
void LogBase::LogOutput(LogType type, const std::string& text) const
|
2014-08-22 16:58:50 +02:00
|
|
|
{
|
2014-08-23 16:51:51 +02:00
|
|
|
switch (type)
|
|
|
|
|
{
|
2015-01-18 23:54:56 +01:00
|
|
|
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() + " error: " + text); break;
|
|
|
|
|
case LogTodo: LOG_ERROR(HLE, GetName() + " TODO: " + text); break;
|
2015-07-02 03:54:36 +02:00
|
|
|
case LogFatal: throw EXCEPTION("%s error: %s", GetName().c_str(), text.c_str());
|
2014-09-08 16:56:47 +02:00
|
|
|
}
|
|
|
|
|
}
|