MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / setColorForLogPriority

Function setColorForLogPriority

base/base/terminalColors.cpp:25–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25const char * setColorForLogPriority(int priority)
26{
27 if (priority < 1 || priority > 8)
28 return "";
29
30 static const char * colors[] =
31 {
32 "",
33 "\033[1;41m", /// Fatal
34 "\033[7;31m", /// Critical
35 "\033[1;31m", /// Error
36 "\033[0;31m", /// Warning
37 "\033[0;33m", /// Notice
38 "\033[1m", /// Information
39 "", /// Debug
40 "\033[2m", /// Trace
41 };
42
43 return colors[priority];
44}
45
46const char * resetColor()
47{

Callers 2

formatExtendedMethod · 0.85
writeLogsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected