47 if (m_colors_enabled) {
48 switch (entry.severity) {
50 os << AnsiColors::Cyan;
53 os << AnsiColors::Blue;
56 os << AnsiColors::Green;
59 os << AnsiColors::Yellow;
62 os << AnsiColors::BrightRed;
65 os << AnsiColors::BgRed << AnsiColors::White;
68 os << AnsiColors::Reset;
71 os << AnsiColors::Reset;
76 os <<
"[" << Utils::enum_to_string(entry.severity) <<
"]" << AnsiColors::Reset;
78 os << AnsiColors::Magenta <<
"[" << Utils::enum_to_string(entry.component) <<
"]" << AnsiColors::Reset;
80 os << AnsiColors::Cyan <<
"[" << Utils::enum_to_string(entry.context) <<
"]" << AnsiColors::Reset <<
" ";
82 if constexpr (std::is_same_v<Entry, JournalEntry>) {
84 if (entry.location.file_name() !=
nullptr) {
85 os << AnsiColors::BrightBlue <<
" (" << entry.location.file_name()
86 <<
":" << entry.location.line() <<
")" << AnsiColors::Reset;
90 if (entry.file_name !=
nullptr) {
91 os << AnsiColors::BrightBlue <<
" (" << entry.file_name
92 <<
":" << entry.line <<
")" << AnsiColors::Reset;
96 if (m_colors_enabled) {
97 os << AnsiColors::Reset;