diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-04-30 20:14:10 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2021-04-30 20:14:10 +0100 |
commit | 2e7ec8c0b91dc51e6e22b2f55cc4511610044673 (patch) | |
tree | 176087486c8509c694826eb429ecf110b6efcdb5 /tty.c | |
parent | 32c97a7f2f12a6689b8ffc5596484860ac8fbbec (diff) | |
download | rtmux-2e7ec8c0b91dc51e6e22b2f55cc4511610044673.tar.gz rtmux-2e7ec8c0b91dc51e6e22b2f55cc4511610044673.tar.bz2 rtmux-2e7ec8c0b91dc51e6e22b2f55cc4511610044673.zip |
Improve logging of screen mode changes.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) |