mirror of https://github.com/AxioDL/logvisor.git
windows fixes and enum migration
This commit is contained in:
parent
834e089885
commit
33f2f7b279
|
@ -84,7 +84,8 @@ struct ConsoleLogger : public ILogger
|
||||||
static void _reportHead(const char* modName, Level severity)
|
static void _reportHead(const char* modName, Level severity)
|
||||||
{
|
{
|
||||||
std::chrono::steady_clock::duration tm = CurrentUptime();
|
std::chrono::steady_clock::duration tm = CurrentUptime();
|
||||||
double tmd = std::chrono::steady_clock::duration::period::num * tm.count() /
|
double tmd = tm.count() *
|
||||||
|
std::chrono::steady_clock::duration::period::num /
|
||||||
(double)std::chrono::steady_clock::duration::period::den;
|
(double)std::chrono::steady_clock::duration::period::den;
|
||||||
std::thread::id thrId = std::this_thread::get_id();
|
std::thread::id thrId = std::this_thread::get_id();
|
||||||
const char* thrName = nullptr;
|
const char* thrName = nullptr;
|
||||||
|
@ -132,16 +133,16 @@ struct ConsoleLogger : public ILogger
|
||||||
fprintf(stderr, BOLD "[");
|
fprintf(stderr, BOLD "[");
|
||||||
switch (severity)
|
switch (severity)
|
||||||
{
|
{
|
||||||
case INFO:
|
case Info:
|
||||||
fprintf(stderr, BOLD CYAN "INFO");
|
fprintf(stderr, BOLD CYAN "INFO");
|
||||||
break;
|
break;
|
||||||
case WARNING:
|
case Warning:
|
||||||
fprintf(stderr, BOLD YELLOW "WARNING");
|
fprintf(stderr, BOLD YELLOW "WARNING");
|
||||||
break;
|
break;
|
||||||
case ERROR:
|
case Error:
|
||||||
fprintf(stderr, BOLD RED "ERROR");
|
fprintf(stderr, BOLD RED "ERROR");
|
||||||
break;
|
break;
|
||||||
case FATAL_ERROR:
|
case FatalError:
|
||||||
fprintf(stderr, BOLD RED "FATAL ERROR");
|
fprintf(stderr, BOLD RED "FATAL ERROR");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -160,16 +161,16 @@ struct ConsoleLogger : public ILogger
|
||||||
fprintf(stderr, "[");
|
fprintf(stderr, "[");
|
||||||
switch (severity)
|
switch (severity)
|
||||||
{
|
{
|
||||||
case INFO:
|
case Info:
|
||||||
fprintf(stderr, "INFO");
|
fprintf(stderr, "INFO");
|
||||||
break;
|
break;
|
||||||
case WARNING:
|
case Warning:
|
||||||
fprintf(stderr, "WARNING");
|
fprintf(stderr, "WARNING");
|
||||||
break;
|
break;
|
||||||
case ERROR:
|
case Error:
|
||||||
fprintf(stderr, "ERROR");
|
fprintf(stderr, "ERROR");
|
||||||
break;
|
break;
|
||||||
case FATAL_ERROR:
|
case FatalError:
|
||||||
fprintf(stderr, "FATAL ERROR");
|
fprintf(stderr, "FATAL ERROR");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -228,7 +229,8 @@ struct FileLogger : public ILogger
|
||||||
void _reportHead(const char* modName, Level severity)
|
void _reportHead(const char* modName, Level severity)
|
||||||
{
|
{
|
||||||
std::chrono::steady_clock::duration tm = CurrentUptime();
|
std::chrono::steady_clock::duration tm = CurrentUptime();
|
||||||
double tmd = std::chrono::steady_clock::duration::period::num * tm.count() /
|
double tmd = tm.count() *
|
||||||
|
std::chrono::steady_clock::duration::period::num /
|
||||||
(double)std::chrono::steady_clock::duration::period::den;
|
(double)std::chrono::steady_clock::duration::period::den;
|
||||||
std::thread::id thrId = std::this_thread::get_id();
|
std::thread::id thrId = std::this_thread::get_id();
|
||||||
const char* thrName = nullptr;
|
const char* thrName = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue