Restore the original console color after logging a message.

Fixes #277
This commit is contained in:
Yuri Kunde Schlesner 2014-12-14 02:09:56 -02:00
parent 9ce11b2d92
commit ac87c3b0d0
2 changed files with 25 additions and 13 deletions

View file

@ -29,6 +29,8 @@ const char* TrimSourcePath(const char* path, const char* root = "src");
void FormatLogMessage(const Entry& entry, char* out_text, size_t text_len);
/// Formats and prints a log entry to stderr.
void PrintMessage(const Entry& entry);
/// Prints the same message as `PrintMessage`, but colored acoording to the severity level.
void PrintColoredMessage(const Entry& entry);
/**
* Logging loop that repeatedly reads messages from the provided logger and prints them to the