diff options
author | 2012-09-06 04:37:38 +0000 | |
---|---|---|
committer | 2012-09-06 04:37:38 +0000 | |
commit | f1e46f2c7c5db118d44e6928eb887d06ab7fa321 (patch) | |
tree | 8dbe086e8d187f8b45bf2bbc4b9fb5d3ef79d2e3 /usr.bin/ssh/log.c | |
parent | Restore missing space. (diff) | |
download | wireguard-openbsd-f1e46f2c7c5db118d44e6928eb887d06ab7fa321.tar.xz wireguard-openbsd-f1e46f2c7c5db118d44e6928eb887d06ab7fa321.zip |
Add ~v and ~V escape sequences to raise and lower the logging level
respectively. Man page help from jmc, ok deraadt jmc
Diffstat (limited to 'usr.bin/ssh/log.c')
-rw-r--r-- | usr.bin/ssh/log.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/ssh/log.c b/usr.bin/ssh/log.c index 82d2ca9d600..61a2b4afa52 100644 --- a/usr.bin/ssh/log.c +++ b/usr.bin/ssh/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.42 2011/06/17 21:44:30 djm Exp $ */ +/* $OpenBSD: log.c,v 1.43 2012/09/06 04:37:39 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -295,6 +295,21 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) } } +void +log_change_level(LogLevel new_log_level) +{ + /* no-op if log_init has not been called */ + if (argv0 == NULL) + return; + log_init(argv0, new_log_level, log_facility, log_on_stderr); +} + +int +log_is_on_stderr(void) +{ + return log_on_stderr; +} + #define MSGBUFSIZ 1024 void |