summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-11-24 21:19:46 +0000
committernicm <nicm@openbsd.org>2015-11-24 21:19:46 +0000
commit0a607e68121471034e862839247963a0dc80fceb (patch)
tree0169528762bd072b6f44d383811be2d1911c10ee /usr.bin/tmux/tmux.c
parentRevert previous tweak, pending a more complete rewording. Discussed with (diff)
downloadwireguard-openbsd-0a607e68121471034e862839247963a0dc80fceb.tar.xz
wireguard-openbsd-0a607e68121471034e862839247963a0dc80fceb.zip
Make the log stuff a bit tidier with some helper functions.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r--usr.bin/tmux/tmux.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 14c6e44dfdb..af6fec24308 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.156 2015/11/22 19:41:19 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.157 2015/11/24 21:19:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -44,7 +44,6 @@ struct options *global_w_options; /* window options */
struct environ *global_environ;
char *shell_cmd;
-int debug_level;
time_t start_time;
char socket_path[PATH_MAX];
@@ -61,18 +60,6 @@ usage(void)
exit(1);
}
-void
-logfile(const char *name)
-{
- char *path;
-
- if (debug_level > 0) {
- xasprintf(&path, "tmux-%s-%ld.log", name, (long) getpid());
- log_open(path);
- free(path);
- }
-}
-
const char *
getshell(void)
{
@@ -243,7 +230,7 @@ main(int argc, char **argv)
flags |= CLIENT_UTF8;
break;
case 'v':
- debug_level++;
+ log_add_level();
break;
default:
usage();