mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-04 10:47:59 +03:00
29 lines
525 B
C++
29 lines
525 B
C++
#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::cout << "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;
|
|
}
|
|
}
|