mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-29 08:17:59 +03:00
30 lines
524 B
C++
30 lines
524 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::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;
|
||
|
}
|
||
|
}
|