C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k
stars
918
forks
source link
Allow colored terminal output on Windows if ENABLE_VIRTUAL_TERMINAL_PROCESSING is set #843
This improves the compatibility of the LoggingFlag::ColoredTerminalOutput setting on Windows.
Windows 10 and later introduced virtual terminal support in conhost and Windows Terminal, see also https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences. This adds logic to easylogging++ to detect when virtual terminal processing is enabled, to allow colored output if LoggingFlag::ColoredTerminalOutput is set.
Before, easylogging++ would not attempt to output VT colored text even if the user enabled LoggingFlag::ColoredTerminalOutput and the terminal supports it.
With this change, running the all-logs sample in Windows Terminal:
This improves the compatibility of the
LoggingFlag::ColoredTerminalOutput
setting on Windows.Windows 10 and later introduced virtual terminal support in conhost and Windows Terminal, see also https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences. This adds logic to easylogging++ to detect when virtual terminal processing is enabled, to allow colored output if
LoggingFlag::ColoredTerminalOutput
is set.Before, easylogging++ would not attempt to output VT colored text even if the user enabled
LoggingFlag::ColoredTerminalOutput
and the terminal supports it.With this change, running the all-logs sample in Windows Terminal:
This is a
I have
CHANGELOG.md
README.md