aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2017-06-16 15:12:38 +0000
committernicm <nicm>2017-06-16 15:12:38 +0000
commita67df177634f5ff3f6a24598d4016f61a794af62 (patch)
tree3eb9537b70db08203f2ca8237da325d6176031f5
parentd685604d0460fd5894c53b20d18e6157e8dc0000 (diff)
downloadrtmux-a67df177634f5ff3f6a24598d4016f61a794af62.tar.gz
rtmux-a67df177634f5ff3f6a24598d4016f61a794af62.tar.bz2
rtmux-a67df177634f5ff3f6a24598d4016f61a794af62.zip
Tweak some logging.
-rw-r--r--cmd-find.c14
-rw-r--r--cmd-queue.c2
2 files changed, 13 insertions, 3 deletions
diff --git a/cmd-find.c b/cmd-find.c
index a74ccaee..7736dcf3 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -950,7 +950,7 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
struct mouse_event *m;
struct cmd_find_state current;
char *colon, *period, *copy = NULL;
- const char *session, *window, *pane;
+ const char *session, *window, *pane, *s;
int window_only = 0, pane_only = 0;
/* Can fail flag implies quiet. */
@@ -958,10 +958,18 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
flags |= CMD_FIND_QUIET;
/* Log the arguments. */
+ if (type == CMD_FIND_PANE)
+ s = "pane";
+ else if (type == CMD_FIND_WINDOW)
+ s = "window";
+ else if (type == CMD_FIND_SESSION)
+ s = "session";
+ else
+ s = "unknown";
if (target == NULL)
- log_debug("%s: target none, type %d", __func__, type);
+ log_debug("%s: target none, type %s", __func__, s);
else
- log_debug("%s: target %s, type %d", __func__, target, type);
+ log_debug("%s: target %s, type %s", __func__, target, s);
log_debug("%s: item %p, flags %#x", __func__, item, flags);
/* Clear new state. */
diff --git a/cmd-queue.c b/cmd-queue.c
index 8d89e990..db802339 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -453,6 +453,8 @@ cmdq_error(struct cmdq_item *item, const char *fmt, ...)
msglen = xvasprintf(&msg, fmt, ap);
va_end(ap);
+ log_debug("%s: %s", __func__, msg);
+
if (c == NULL)
cfg_add_cause("%s:%u: %s", cmd->file, cmd->line, msg);
else if (c->session == NULL || (c->flags & CLIENT_CONTROL)) {