Skip to content

Commit

Permalink
windows fixes and enum migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jackoalan committed Jul 4, 2015
1 parent 834e089 commit 33f2f7b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/LogVisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ struct ConsoleLogger : public ILogger
static void _reportHead(const char* modName, Level severity)
{
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;
std::thread::id thrId = std::this_thread::get_id();
const char* thrName = nullptr;
Expand Down Expand Up @@ -132,16 +133,16 @@ struct ConsoleLogger : public ILogger
fprintf(stderr, BOLD "[");
switch (severity)
{
case INFO:
case Info:
fprintf(stderr, BOLD CYAN "INFO");
break;
case WARNING:
case Warning:
fprintf(stderr, BOLD YELLOW "WARNING");
break;
case ERROR:
case Error:
fprintf(stderr, BOLD RED "ERROR");
break;
case FATAL_ERROR:
case FatalError:
fprintf(stderr, BOLD RED "FATAL ERROR");
break;
default:
Expand All @@ -160,16 +161,16 @@ struct ConsoleLogger : public ILogger
fprintf(stderr, "[");
switch (severity)
{
case INFO:
case Info:
fprintf(stderr, "INFO");
break;
case WARNING:
case Warning:
fprintf(stderr, "WARNING");
break;
case ERROR:
case Error:
fprintf(stderr, "ERROR");
break;
case FATAL_ERROR:
case FatalError:
fprintf(stderr, "FATAL ERROR");
break;
default:
Expand Down Expand Up @@ -228,7 +229,8 @@ struct FileLogger : public ILogger
void _reportHead(const char* modName, Level severity)
{
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;
std::thread::id thrId = std::this_thread::get_id();
const char* thrName = nullptr;
Expand Down

0 comments on commit 33f2f7b

Please sign in to comment.