aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xtl_logger_stdio.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-28 09:35:12 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-28 09:35:12 +0100
commitb140baacc3f44286593c232c1df61f6b1b3ad52f (patch)
treebbb8268ef2bf193519761b98685abf1076dc5449 /tools/libxc/xtl_logger_stdio.c
parent1fe4b0e07c2ed1d521dfabc6f3f564932fcf3224 (diff)
downloadxen-b140baacc3f44286593c232c1df61f6b1b3ad52f.tar.gz
xen-b140baacc3f44286593c232c1df61f6b1b3ad52f.tar.bz2
xen-b140baacc3f44286593c232c1df61f6b1b3ad52f.zip
xl: Allow control of logging level.
The -v option, which must come before the xl command, increases the logging level each time it is supplied. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xtl_logger_stdio.c')
-rw-r--r--tools/libxc/xtl_logger_stdio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/libxc/xtl_logger_stdio.c b/tools/libxc/xtl_logger_stdio.c
index 587c67da6a..abe274ab08 100644
--- a/tools/libxc/xtl_logger_stdio.c
+++ b/tools/libxc/xtl_logger_stdio.c
@@ -36,6 +36,9 @@ static void stdiostream_vmessage(xentoollog_logger *logger_in,
va_list al) {
xentoollog_logger_stdiostream *lg = (void*)logger_in;
+ if (level < lg->min_level)
+ return;
+
progress_erase(lg);
if (lg->flags & XTL_STDIOSTREAM_SHOW_DATE) {
@@ -82,7 +85,7 @@ static void stdiostream_progress(struct xentoollog_logger *logger_in,
this_level = XTL_PROGRESS;
}
- if (lg->min_level < this_level)
+ if (this_level < lg->min_level)
return;
if (lg->progress_erase_len)