1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-16 09:28:24 +02:00

Add log levels report

This commit is contained in:
Vadim Markovtsev
2016-10-02 20:21:20 +02:00
parent 6f82dc3e15
commit a4e550e3cf
4 changed files with 47 additions and 3 deletions
+20
View File
@@ -21,6 +21,26 @@ namespace ELogLevel
WARN,
ERROR
};
inline std::string to_string(ELogLevel level)
{
switch (level) {
case NOT_SET:
return "not set";
case TRACE:
return "trace";
case DEBUG:
return "debug";
case INFO:
return "info";
case WARN:
return "warn";
case ERROR:
return "error";
default:
return std::string("invalid (") + std::to_string(level) + ")";
}
}
}
namespace vstd