1#include <boost/predef.h>
3#include <helpers/TestSink.h>
33 auto supportsColor = [] {
52 return _isatty(_fileno(stdout)) != 0;
57 return isatty(STDOUT_FILENO) != 0;
61 auto color = [level]() {
81 auto prefix = [level]() {
112 constexpr auto reset =
"\033[0m";
116 stream << color << prefix <<
" " << text << reset <<
std::endl;
120 stream << prefix <<
" " << text <<
std::endl;
virtual Severity threshold() const
Returns the minimum severity level this sink will report.
void writeAlways(beast::severities::Severity level, std::string const &text) override
Bypass filter and write text to the sink at the specified severity.
TestSink(beast::severities::Severity threshold=beast::severities::kDebug)
void write(beast::severities::Severity level, std::string const &text) override
Write text to the sink at the specified severity.
Severity
Severity level / threshold of a Journal message.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.