diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-28 09:35:12 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-28 09:35:12 +0100 |
commit | b140baacc3f44286593c232c1df61f6b1b3ad52f (patch) | |
tree | bbb8268ef2bf193519761b98685abf1076dc5449 /tools/libxc/xtl_logger_stdio.c | |
parent | 1fe4b0e07c2ed1d521dfabc6f3f564932fcf3224 (diff) | |
download | xen-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.c | 5 |
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) |