colourize warnings and errors
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
e8130b8f2c
commit
5dada13a1a
1 changed files with 4 additions and 2 deletions
|
@ -1668,10 +1668,12 @@ int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list
|
||||||
/* print a prefix to the message */
|
/* print a prefix to the message */
|
||||||
switch(level) {
|
switch(level) {
|
||||||
case ALPM_LOG_ERROR:
|
case ALPM_LOG_ERROR:
|
||||||
fprintf(stream, _("error: "));
|
fprintf(stream, "%s%s%s", config->colstr.err, _("error: "),
|
||||||
|
config->colstr.nocolor);
|
||||||
break;
|
break;
|
||||||
case ALPM_LOG_WARNING:
|
case ALPM_LOG_WARNING:
|
||||||
fprintf(stream, _("warning: "));
|
fprintf(stream, "%s%s%s", config->colstr.warn, _("warning: "),
|
||||||
|
config->colstr.nocolor);
|
||||||
break;
|
break;
|
||||||
case ALPM_LOG_DEBUG:
|
case ALPM_LOG_DEBUG:
|
||||||
fprintf(stream, "debug: ");
|
fprintf(stream, "debug: ");
|
||||||
|
|
Loading…
Add table
Reference in a new issue