From 94b5ac47281d1d4e4f35197a6a43f8f45d24f8e9 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 30 May 2010 21:11:10 +1200 Subject: [PATCH] Bug 2810: common log format generates 2 lines of syslog Based on work by Keyran Bayliss --- src/access_log.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/access_log.cc b/src/access_log.cc index f3e0762bec..c44c12d980 100644 --- a/src/access_log.cc +++ b/src/access_log.cc @@ -1807,7 +1807,7 @@ accessLogCommon(AccessLogEntry * al, Logfile * logfile) user2 = accessLogFormatName(al->cache.rfc931); - logfilePrintf(logfile, "%s %s %s [%s] \"%s %s HTTP/%d.%d\" %d %"PRId64" %s:%s", + logfilePrintf(logfile, "%s %s %s [%s] \"%s %s HTTP/%d.%d\" %d %"PRId64" %s:%s%s", client, user2 ? user2 : dash_str, user1 ? user1 : dash_str, @@ -1818,7 +1818,8 @@ accessLogCommon(AccessLogEntry * al, Logfile * logfile) al->http.code, al->cache.replySize, log_tags[al->cache.code], - hier_strings[al->hier.code]); + hier_strings[al->hier.code], + (Config.onoff.log_mime_hdrs?"":"\n")); safe_free(user1); @@ -1830,10 +1831,7 @@ accessLogCommon(AccessLogEntry * al, Logfile * logfile) logfilePrintf(logfile, " [%s] [%s]\n", ereq, erep); safe_free(ereq); safe_free(erep); - } else { - logfilePrintf(logfile, "\n"); } - } #if ICAP_CLIENT @@ -2440,4 +2438,3 @@ logTypeIsATcpHit(log_type code) return 0; } - -- 2.47.3