From 9cccb8c1159b0a4747b5152e2df08e42207b574d Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 24 Nov 2015 21:19:46 +0000 Subject: Make the log stuff a bit tidier with some helper functions. --- cmd-show-messages.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd-show-messages.c') diff --git a/cmd-show-messages.c b/cmd-show-messages.c index 92ac5cc2..3d2edf9a 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -61,7 +61,6 @@ cmd_show_messages_server(struct cmd_q *cmdq) cmdq_print(cmdq, "started %s", tim); cmdq_print(cmdq, "socket path %s", socket_path); - cmdq_print(cmdq, "debug level %d", debug_level); cmdq_print(cmdq, "protocol version %d", PROTOCOL_VERSION); return (1); -- cgit From bdbbd9711c05507161bc70ccdde91bdb719d943b Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 24 Nov 2015 21:23:44 +0000 Subject: Show libevent version in showmsgs -I. --- cmd-show-messages.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd-show-messages.c') diff --git a/cmd-show-messages.c b/cmd-show-messages.c index 3d2edf9a..8cf71f41 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -62,6 +62,8 @@ cmd_show_messages_server(struct cmd_q *cmdq) cmdq_print(cmdq, "started %s", tim); cmdq_print(cmdq, "socket path %s", socket_path); cmdq_print(cmdq, "protocol version %d", PROTOCOL_VERSION); + cmdq_print(cmdq, "libevent %s (%s)", event_get_version(), + event_get_method()); return (1); } -- cgit From 1e2df2d46496fc025330c25fa08e83d14e62d11b Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 24 Nov 2015 21:52:06 +0000 Subject: Remove the -I part of show-messages which isn't really that useful; the server start time can now be accessed with a new start_time format (use: tmux display -p '#{t:start_time}') --- cmd-show-messages.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'cmd-show-messages.c') diff --git a/cmd-show-messages.c b/cmd-show-messages.c index 8cf71f41..c98c2c91 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -33,8 +33,8 @@ enum cmd_retval cmd_show_messages_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_show_messages_entry = { "show-messages", "showmsgs", - "IJTt:", 0, 0, - "[-IJT] " CMD_TARGET_CLIENT_USAGE, + "JTt:", 0, 0, + "[-JT] " CMD_TARGET_CLIENT_USAGE, 0, cmd_show_messages_exec }; @@ -47,27 +47,9 @@ const struct cmd_entry cmd_server_info_entry = { cmd_show_messages_exec }; -int cmd_show_messages_server(struct cmd_q *); int cmd_show_messages_terminals(struct cmd_q *, int); int cmd_show_messages_jobs(struct cmd_q *, int); -int -cmd_show_messages_server(struct cmd_q *cmdq) -{ - char *tim; - - tim = ctime(&start_time); - *strchr(tim, '\n') = '\0'; - - cmdq_print(cmdq, "started %s", tim); - cmdq_print(cmdq, "socket path %s", socket_path); - cmdq_print(cmdq, "protocol version %d", PROTOCOL_VERSION); - cmdq_print(cmdq, "libevent %s (%s)", event_get_version(), - event_get_method()); - - return (1); -} - int cmd_show_messages_terminals(struct cmd_q *cmdq, int blank) { @@ -118,10 +100,6 @@ cmd_show_messages_exec(struct cmd *self, struct cmd_q *cmdq) int done, blank; done = blank = 0; - if (args_has(args, 'I') || self->entry == &cmd_server_info_entry) { - blank = cmd_show_messages_server(cmdq); - done = 1; - } if (args_has(args, 'T') || self->entry == &cmd_server_info_entry) { blank = cmd_show_messages_terminals(cmdq, blank); done = 1; -- cgit