summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2013-03-01 20:56:18 +0100
committerAllan McRae <allan@archlinux.org>2013-03-07 06:55:04 +0100
commit5dada13a1a5d8cc6edccf74f80d7e445467cd5f5 (patch)
treea161f23aeaa52a3b718368a390365a419d7dfde6 /src
parente8130b8f2cf540bb0ad12afc552b2774a0ca5a83 (diff)
downloadpacman-5dada13a1a5d8cc6edccf74f80d7e445467cd5f5.tar.gz
pacman-5dada13a1a5d8cc6edccf74f80d7e445467cd5f5.tar.xz
colourize warnings and errors
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index d503073a..4dd0acad 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1668,10 +1668,12 @@ int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list
/* print a prefix to the message */
switch(level) {
case ALPM_LOG_ERROR:
- fprintf(stream, _("error: "));
+ fprintf(stream, "%s%s%s", config->colstr.err, _("error: "),
+ config->colstr.nocolor);
break;
case ALPM_LOG_WARNING:
- fprintf(stream, _("warning: "));
+ fprintf(stream, "%s%s%s", config->colstr.warn, _("warning: "),
+ config->colstr.nocolor);
break;
case ALPM_LOG_DEBUG:
fprintf(stream, "debug: ");