Skip to content
Snippets Groups Projects

[Log] Add possibility to disable colorization of log outputs

3 files
+ 29
1
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -145,6 +145,14 @@ public:
@@ -145,6 +145,14 @@ public:
mConsoleLevel = level;
mConsoleLevel = level;
}
}
 
/**
 
* Set or disable colors on console.
 
* Initial value should be assumed true.
 
*/
 
static void setConsoleColor(bool enabled) {
 
mConsoleColor = enabled;
 
}
 
/**
/**
* Set the minimum log level saved in the log file.
* Set the minimum log level saved in the log file.
*/
*/
@@ -173,6 +181,7 @@ private:
@@ -173,6 +181,7 @@ private:
static void initFile(const std::string& fileName);
static void initFile(const std::string& fileName);
static Level mConsoleLevel;
static Level mConsoleLevel;
 
static bool mConsoleColor;
static Level mFileLevel;
static Level mFileLevel;
static std::string mFileName;
static std::string mFileName;
static std::unique_ptr<FILE, decltype(&std::fclose)> mFile;
static std::unique_ptr<FILE, decltype(&std::fclose)> mFile;
Loading