summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2021-06-10 07:43:44 +0000
committernicm <nicm>2021-06-10 07:43:44 +0000
commit02a6b39db73e55f9f30d46106c378ed4c70cb02b (patch)
tree2153f7d7ff192619cca4e74e8f96f000ed40372d /tty.c
parentf02a6c34e0e8bf2c50ee1dfe9cfacf54370a1405 (diff)
Improve logging of screen mode changes.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 6 insertions, 2 deletions
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)