From 02a6b39db73e55f9f30d46106c378ed4c70cb02b Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 10 Jun 2021 07:43:44 +0000 Subject: Improve logging of screen mode changes. --- tty.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tty.c') diff --git a/tty.c b/tty.c index 367f54d5..45868fc1 100644 --- a/tty.c +++ b/tty.c @@ -665,8 +665,12 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s) mode &= ~MODE_CURSOR; changed = mode ^ tty->mode; - if (changed != 0) - log_debug("%s: update mode %x to %x", c->name, tty->mode, mode); + if (log_get_level() != 0 && changed != 0) { + log_debug("%s: current mode %s", c->name, + screen_mode_to_string(tty->mode)); + log_debug("%s: setting mode %s", c->name, + screen_mode_to_string(mode)); + } if (s != NULL) { if (strcmp(s->ccolour, tty->ccolour) != 0) -- cgit