]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not output extra new lines at the end of debugs() lines (#44)
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 10 Aug 2017 14:42:25 +0000 (08:42 -0600)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2017 14:42:25 +0000 (08:42 -0600)
Debugs() adds a new line automatically. Extra new lines complicate
parsing and viewing cache logs.

src/fs_io.cc
src/icmp/IcmpPinger.cc
src/main.cc
src/security/Session.cc
src/ssl/support.cc

index be3b1070599502f719c853558a0a85b9a7149355..dd180f6cd2c590044853268075579398823db657 100644 (file)
@@ -117,7 +117,7 @@ file_close(int fd)
 
     close(fd);
 
-    debugs(6, F->flags.close_request ? 2 : 5, "file_close: FD " << fd << " really closing\n");
+    debugs(6, F->flags.close_request ? 2 : 5, "file_close: FD " << fd << " really closing");
 
     fd_close(fd);
 
index 95db1ccd953c6b3101935caf99d785f36f1d7c6f..9ad32e7dd62b12666e0ac42de3c33e45b6db4b03 100644 (file)
@@ -177,7 +177,7 @@ IcmpPinger::Recv(void)
 
     if (0 == n) {
         /* EOF indicator */
-        debugs(42, DBG_CRITICAL, HERE << "EOF encountered. Pinger exiting.\n");
+        debugs(42, DBG_CRITICAL, "EOF encountered. Pinger exiting.");
         errno = 0;
         Close();
         exit(EXIT_FAILURE);
index f481f92e6d1f4972b58b089c5e4b0779b8cf1166..7a7e7aa2aa5e52484b996a4286195daf0e6a28a4 100644 (file)
@@ -1626,7 +1626,7 @@ SquidMain(int argc, char **argv)
         return 0;
     }
 
-    debugs(1,2, HERE << "Doing post-config initialization\n");
+    debugs(1,2, "Doing post-config initialization");
     leave_suid();
     RunRegisteredHere(RegisteredRunner::finalizeConfig);
 
index 9d33d2d7a029327fcc1356f360c9de3c25e58f41..4a2b4b08f2cbf5c4467857937e9ad05466358802 100644 (file)
@@ -364,7 +364,7 @@ get_session_cb(SSL *, unsigned char *sessionID, int len, int *copy)
     }
 
     if (!session)
-        debugs(83, 5, "Failed to retrieve SSL_SESSION from cache\n");
+        debugs(83, 5, "Failed to retrieve SSL_SESSION from cache");
 
     // With the parameter copy the callback can require the SSL engine
     // to increment the reference count of the SSL_SESSION object, Normally
index f85170700ca253de0ed78d976c5487f4dd693208..d6c616c61c956642de43afc80d5278b01af09250 100644 (file)
@@ -1006,7 +1006,7 @@ Ssl::setClientSNI(SSL *ssl, const char *fqdn)
     }
     return true;
 #else
-    debugs(83, 7,  "no support for TLS servername extension (SNI)\n");
+    debugs(83, 7,  "no support for TLS servername extension (SNI)");
     return false;
 #endif
 }
@@ -1215,7 +1215,7 @@ completeIssuers(X509_STORE_CTX *ctx, STACK_OF(X509) *untrustedCerts)
 static int
 untrustedToStoreCtx_cb(X509_STORE_CTX *ctx,void *data)
 {
-    debugs(83, 4,  "Try to use pre-downloaded intermediate certificates\n");
+    debugs(83, 4,  "Try to use pre-downloaded intermediate certificates");
 
     SSL *ssl = static_cast<SSL *>(X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()));
     STACK_OF(X509) *sslUntrustedStack = static_cast <STACK_OF(X509) *>(SSL_get_ex_data(ssl, ssl_ex_index_ssl_untrusted_chain));