A STDLogSink that colorizes "warning" or "error" keywords.
More...
#include <log.h>
|
void | PreprocessLine (std::string &line) override |
| Do any processing required to a line before printing it. Nothing in the base class. More...
|
|
std::string | replace (const std::string &search, const std::string &before, const std::string &after, std::string subject) |
| Replaces warning keywords with ANSI escape sequences. More...
|
|
void | Flush () |
|
std::string | WrapString (std::string str) |
| Wraps long lines and adds indentation as needed.
|
|
virtual void | PreprocessLine (std::string &line) |
| Do any processing required to a line before printing it. Nothing in the base class. More...
|
|
|
unsigned int | m_indentSize |
| Number of spaces in one indentation.
|
|
unsigned int | m_termWidth |
| Width of the console we're printing to, in characters.
|
|
bool | m_lastMessageWasNewline |
| True if the last message ended in a
character.
|
|
Severity | m_min_severity |
| Minimum severity of messages to be printed.
|
|
A STDLogSink that colorizes "warning" or "error" keywords.
◆ PreprocessLine()
void ColoredSTDLogSink::PreprocessLine |
( |
std::string & |
line | ) |
|
|
overrideprotectedvirtual |
Do any processing required to a line before printing it. Nothing in the base class.
Reimplemented from LogSink.
◆ replace()
string ColoredSTDLogSink::replace |
( |
const std::string & |
search, |
|
|
const std::string & |
before, |
|
|
const std::string & |
after, |
|
|
std::string |
subject |
|
) |
| |
|
protected |
Replaces warning keywords with ANSI escape sequences.
- Parameters
-
search | String to look for |
before | Prepended to the output if matched |
after | Inserted after the search string if matched |
subject | Input string |
Colorized | string |
The documentation for this class was generated from the following files: