From ecc2cae3f7504e65a43e7be6fa56edc0b549f594 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 4 Aug 2011 21:43:55 +0200 Subject: [PATCH] Bugfix: use ELOG to actually get the error message into the logfile shown by i3-nagbar --- src/cfgparse.y | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/cfgparse.y b/src/cfgparse.y index b4ec94d2..8426de0b 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -346,11 +346,13 @@ static void check_for_duplicate_bindings(struct context *context) { bind->mods != current->mods) continue; context->has_errors = true; - fprintf(stderr, "Duplicated keybinding in config file: mod%d with key %s", current->mods, current->symbol); - /* if keycode is 0, this is a keysym binding */ - if (current->keycode != 0) - fprintf(stderr, " and keycode %d", current->keycode); - fprintf(stderr, "\n"); + if (current->keycode != 0) { + ELOG("Duplicate keybinding in config file:\n modmask %d with keycode %d, command \"%s\"\n", + current->mods, current->keycode, current->command); + } else { + ELOG("Duplicate keybinding in config file:\n modmask %d with keysym %s, command \"%s\"\n", + current->mods, current->symbol, current->command); + } } } } -- 2.39.5