Message ID | 1412095552-27429-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Sep 30, 2014 at 06:45:52PM +0200, Daniel Vetter wrote: > With the structured logging it makes more sense to tune this down a > bit. Also, this way it is consistent with Thomas Wood's new activity > indicator helper. Tune it down? It was on stderr to segregate it from stdout. So either the activity indicator is sufficient to take over, or it should be made so. -Chris
On Tue, Sep 30, 2014 at 08:58:14PM +0100, Chris Wilson wrote: > On Tue, Sep 30, 2014 at 06:45:52PM +0200, Daniel Vetter wrote: > > With the structured logging it makes more sense to tune this down a > > bit. Also, this way it is consistent with Thomas Wood's new activity > > indicator helper. > > Tune it down? It was on stderr to segregate it from stdout. So either > the activity indicator is sufficient to take over, or it should be made > so. The revised patch after a bit of discussion with Thomas on irc does it better. Let me resend. -Daniel
diff --git a/lib/igt_aux.c b/lib/igt_aux.c index 180c2742ab10..f6fef5875c69 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -229,11 +229,11 @@ void igt_progress(const char *header, uint64_t i, uint64_t total) { int divider = 200; - if (!isatty(fileno(stderr))) + if (!isatty(STDOUT_FILENO)) return; if (i+1 >= total) { - igt_warn("\r%s100%%\n", header); + igt_info("\r%s100%%\n", header); return; } @@ -242,7 +242,7 @@ void igt_progress(const char *header, uint64_t i, uint64_t total) /* only bother updating about every 0.5% */ if (i % (total / divider) == 0) - igt_warn("\r%s%3llu%%", header, + igt_info("\r%s%3llu%%", header, (long long unsigned)i * 100 / total); }
With the structured logging it makes more sense to tune this down a bit. Also, this way it is consistent with Thomas Wood's new activity indicator helper. Spotted while discussing Thomas' patch with him. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- lib/igt_aux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)