Support SIGUSR2 to stop and start logging for an existing server. Also

we currently only have two log levels so just use -v and -vv rather than
-v and -vvvv, and clarify the man page entry for -v.
This commit is contained in:
nicm
2017-06-04 08:25:57 +00:00
parent 184039044a
commit adf5628087
6 changed files with 51 additions and 6 deletions

2
tmux.h
View File

@ -1493,6 +1493,7 @@ struct tmuxpeer *proc_add_peer(struct tmuxproc *, int,
void (*)(struct imsg *, void *), void *);
void proc_remove_peer(struct tmuxpeer *);
void proc_kill_peer(struct tmuxpeer *);
void proc_toggle_log(struct tmuxproc *);
/* cfg.c */
extern int cfg_finished;
@ -2336,6 +2337,7 @@ char *get_proc_name(int, char *);
void log_add_level(void);
int log_get_level(void);
void log_open(const char *);
void log_toggle(const char *);
void log_close(void);
void printflike(1, 2) log_debug(const char *, ...);
__dead void printflike(1, 2) fatal(const char *, ...);