diff options
-rw-r--r-- | usr.bin/ssh/log-server.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ssh/log-server.c b/usr.bin/ssh/log-server.c index 124d7fe6b69..a9145347474 100644 --- a/usr.bin/ssh/log-server.c +++ b/usr.bin/ssh/log-server.c @@ -15,7 +15,7 @@ */ #include "includes.h" -RCSID("$Id: log-server.c,v 1.12 2000/02/27 18:50:09 deraadt Exp $"); +RCSID("$Id: log-server.c,v 1.13 2000/03/28 20:26:21 markus Exp $"); #include <syslog.h> #include "packet.h" @@ -132,9 +132,11 @@ do_log(LogLevel level, const char *fmt, va_list args) } else { vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); } - if (log_on_stderr) + if (log_on_stderr) { fprintf(stderr, "%s\n", msgbuf); - openlog(__progname, LOG_PID, log_facility); - syslog(pri, "%.500s", msgbuf); - closelog(); + } else { + openlog(__progname, LOG_PID, log_facility); + syslog(pri, "%.500s", msgbuf); + closelog(); + } } |