76{
77#if AC_PLATFORM == AC_PLATFORM_WINDOWS
79 {
80 0,
81 FOREGROUND_RED,
82 FOREGROUND_GREEN,
83 FOREGROUND_RED | FOREGROUND_GREEN,
84 FOREGROUND_BLUE,
85 FOREGROUND_RED | FOREGROUND_BLUE,
86 FOREGROUND_GREEN | FOREGROUND_BLUE,
87 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE,
88
89 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY,
90
91 FOREGROUND_RED | FOREGROUND_INTENSITY,
92
93 FOREGROUND_GREEN | FOREGROUND_INTENSITY,
94 FOREGROUND_BLUE | FOREGROUND_INTENSITY,
95
96 FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
97
98 FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
99
100 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY
101 };
102
103 HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE);
104 SetConsoleTextAttribute(hConsole, WinColorFG[color]);
105#else
106 enum ANSITextAttr
107 {
108 TA_NORMAL = 0,
109 TA_BOLD = 1,
110 TA_BLINK = 5,
111 TA_REVERSE = 7
112 };
113
114 enum ANSIFgTextAttr
115 {
116 FG_BLACK = 30,
117 FG_RED,
118 FG_GREEN,
119 FG_BROWN,
120 FG_BLUE,
121 FG_MAGENTA,
122 FG_CYAN,
123 FG_WHITE,
124 FG_YELLOW
125 };
126
127 enum ANSIBgTextAttr
128 {
129 BG_BLACK = 40,
130 BG_RED,
131 BG_GREEN,
132 BG_BROWN,
133 BG_BLUE,
134 BG_MAGENTA,
135 BG_CYAN,
136 BG_WHITE
137 };
138
140 {
141 FG_BLACK,
142 FG_RED,
143 FG_GREEN,
144 FG_BROWN,
145 FG_BLUE,
146 FG_MAGENTA,
147 FG_CYAN,
148 FG_WHITE,
149 FG_YELLOW,
150 FG_RED,
151 FG_GREEN,
152 FG_BLUE,
153 FG_MAGENTA,
154 FG_CYAN,
155 FG_WHITE
156 };
157
158 fprintf((stdout_stream ? stdout : stderr),
"\x1b[%d%sm", UnixColorFG[color], (color >=
YELLOW && color <
NUM_COLOR_TYPES ?
";1" :
""));
159#endif
160}
@ YELLOW
Definition: AppenderConsole.h:35