TombEngine/TR5Main/Game/debug/debug.cpp

30 lines
524 B
C++
Raw Normal View History

2021-08-03 15:08:43 +01:00
#include "framework.h"
#include <iostream>
void TENLog(std::string_view str, LogLevel level, LogConfig config)
{
if constexpr (DebugBuild)
{
if (LogConfig::Debug == config)
{
return;
}
}
switch (level)
{
case LogLevel::Error:
std::cerr << "Error: " << str << "\n";
// Monty code goes here
break;
case LogLevel::Warning:
std::cout << "Warning: " << str << "\n";
// Monty code goes here
break;
case LogLevel::Info:
std::cout << "Info: " << str << "\n";
// Monty code goes here
break;
}
}