From 6d4b4ef7ec68ffe45c9a45568946cf157b00b8f4 Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 28 Mar 2000 20:26:21 +0000 Subject: [PATCH] do not log() if debuggin to stderr --- usr.bin/ssh/log-server.c | 12 +++++++----- 1 file 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 #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(); + } } -- 2.20.1