| 23 | } |
| 24 | |
| 25 | const 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 | |
| 46 | const char * resetColor() |
| 47 | { |
no outgoing calls
no test coverage detected