Make logger name colored

This commit is contained in:
Azat Khuzhin 2020-04-18 02:31:54 +03:00
parent fa62be250f
commit 2dbf8ba219

View File

@ -75,7 +75,11 @@ void OwnPatternFormatter::formatExtended(const DB::ExtendedLogMessage & msg_ext,
if (color)
writeCString(resetColor(), wb);
writeCString("> ", wb);
if (color)
writeString(setColor(std::hash<std::string>()(msg.getSource())), wb);
DB::writeString(msg.getSource(), wb);
if (color)
writeCString(resetColor(), wb);
writeCString(": ", wb);
DB::writeString(msg.getText(), wb);
}