]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add buffered_logs OFF support to UDP logger (#1315)
authorRybakov Andrey <rybakovandrey85@gmail.com>
Mon, 17 Apr 2023 09:46:32 +0000 (09:46 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 17 Apr 2023 11:08:29 +0000 (11:08 +0000)
UDP log module always buffers log entries with a limit of
1400 bytes. Enable the "buffered_logs off" squid.conf
setting to disable this behaviour.

doc/release-notes/release-7.sgml.in
src/cf.data.pre
src/log/ModUdp.cc

index ecb5b90267ff2afcfe61ca7131ae108571d775cc..086e6350d8e52ebcc61863938d8333b3f911331b 100644 (file)
@@ -57,7 +57,8 @@ This section gives an account of those changes in three categories:
 <sect1>Changes to existing directives<label id="modifieddirectives">
 <p>
 <descrip>
-       <p>No changed directives in this version.
+       <tag>buffered_logs</tag>
+       <p>Honor the <em>off</em> setting in 'udp' access_log module.
 
 </descrip>
 
index 71555d237aa2807cf6b149493ab6b9b07d0ce672..c6783f7be096f73f502684e735e84e0a2be1a3d8 100644 (file)
@@ -5554,7 +5554,7 @@ DOC_START
        records if it cannot write/send them immediately due to pending I/Os
        (e.g., the I/O writing the previous log record) or connectivity loss.
 
-       Currently honored by 'daemon' and 'tcp' access_log modules only.
+       Currently honored by 'daemon', 'tcp' and 'udp' access_log modules only.
 DOC_END
 
 NAME: netdb_filename
index dedec4d4a91249000670ff390eebbb3e541d80c2..905f7ba30380f72c4c6ef8dd6d854f7ee617bf49 100644 (file)
@@ -101,8 +101,10 @@ logfile_mod_udp_linestart(Logfile *)
 }
 
 static void
-logfile_mod_udp_lineend(Logfile *)
+logfile_mod_udp_lineend(Logfile *lf)
 {
+    if (!Config.onoff.buffered_logs)
+        lf->f_flush(lf);
 }
 
 static void