mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #10343 from azat/colored-logger-name
[RFC] Make logger name colored
This commit is contained in:
commit
a551e1f33b
@ -75,7 +75,11 @@ void OwnPatternFormatter::formatExtended(const DB::ExtendedLogMessage & msg_ext,
|
|||||||
if (color)
|
if (color)
|
||||||
writeCString(resetColor(), wb);
|
writeCString(resetColor(), wb);
|
||||||
writeCString("> ", wb);
|
writeCString("> ", wb);
|
||||||
|
if (color)
|
||||||
|
writeString(setColor(std::hash<std::string>()(msg.getSource())), wb);
|
||||||
DB::writeString(msg.getSource(), wb);
|
DB::writeString(msg.getSource(), wb);
|
||||||
|
if (color)
|
||||||
|
writeCString(resetColor(), wb);
|
||||||
writeCString(": ", wb);
|
writeCString(": ", wb);
|
||||||
DB::writeString(msg.getText(), wb);
|
DB::writeString(msg.getText(), wb);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user