Logging issue piped logs vs file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I think I have discovered a bug, where using a log file vs using a pipe command will not log the exact same messages. 

System:
Server version: Apache/2.4.56 (Unix)
Server built:   Jul 10 2023 10:58:41
root@ns-pedros# uname -a
FreeBSD ns-pedros 11.4-NETSCALER-13.1 FreeBSD 11.4-NETSCALER-13.1 #0 a7c4dc80d(rs_131_49_4_RTM): Mon Jul 10 12:01:16 PDT 2023     root@sjc-bld-bsd114-232:/usr/obj/usr/home/build/adc/usr.src/sys/NS64  amd64

I configure the following ErrorLog Directive as follows:
-A:ErrorLog "/var/log/httperror.log"
-B:ErrorLog "|/usr/bin/logger -t httperror -p local3.error" 

I have also tried option B with |$, yielding the same result.

I have to use logger and not the "syslog:facility:tag" because I need to control the level of the log, and this doesn't provide me with that option.

I have syslog writing to a different file, /var/log/httperror_syslog.log

If I use option A, I see the following messages after /bin/httpd -k restart -f /etc/httpd.conf several times, in order to ensure before and after loading the config I get the same set of messages:
[Wed Oct 11 07:54:34.505202 2023] [mpm_prefork:notice] [pid 215] AH00173: SIGHUP received.  Attempting to restart
[Wed Oct 11 07:54:34.624822 2023] [mpm_prefork:notice] [pid 215] AH00163: Apache/2.4.56 (Unix) mod_perl/2.0.10 Perl/v5.30.2 configured -- resuming normal operations
[Wed Oct 11 07:54:34.625678 2023] [core:notice] [pid 215] AH00094: Command line: '/bin/httpd -f /etc/httpd.conf'

If I use option B, after several restarts I have the following set of messages:
Oct 11 07:55:56 <local3.err> ns-pedros httperror: [Wed Oct 11 07:55:56.486944 2023] [mpm_prefork:notice] [pid 215] AH00163: Apache/2.4.56 (Unix) mod_perl/2.0.10 Perl/v5.30.2 configured -- resuming normal operations
Oct 11 07:55:56 <local3.err> ns-pedros httperror: [Wed Oct 11 07:55:56.488838 2023] [core:notice] [pid 215] AH00094: Command line: '/bin/httpd -f /etc/httpd.conf'


Besides the obvious new prefix from syslog, we can see that the SIGHUP message is not sent to the piped log. I will theorize that the pipe is closed before the SIGHUP message is sent. 

I believe that this message should be sent before closing the pipe. Should I open a bug report?

Best Regards
/P
--
--

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux