Browse code

core: added function to update log level color scheme

Elena-Ramona Modroiu authored on 03/09/2012 06:52:26
Showing 2 changed files
... ...
@@ -343,3 +343,11 @@ void dprint_color_reset(void)
343 343
 	dprint_term_color('x', 'x', &obuf);
344 344
 	fprintf(stderr, "%.*s", obuf.len, obuf.s);
345 345
 }
346
+
347
+void dprint_color_update(int level, char f, char b)
348
+{
349
+	if(level<L_MIN || level>L_MAX)
350
+		return;
351
+	if(f && f!='0') _log_level_colors[level - L_MIN].f = f;
352
+	if(b && b!='0') _log_level_colors[level - L_MIN].b = b;
353
+}
... ...
@@ -139,6 +139,7 @@ int log_facility_fixup(void *handle, str *gname, str *name, void **val);
139 139
 
140 140
 void dprint_color(int level);
141 141
 void dprint_color_reset(void);
142
+void dprint_color_update(int level, char f, char b);
142 143
 void dprint_init_colors(void);
143 144
 
144 145
 /** @brief