On 06/27/2019 11:53 PM, Alex Hautequest wrote: > $ tail -F /var/log/apache/access_log /var/log/apache/error_log > > There’s your stdout output, no code modifications needed. You are welcome. > > Jokes aside, you could make use of a web socket to pull these logs out in a > way code doesn’t need to be changed. Or you could dump them straight into a > database. Or, IDK, there are so many ways to extract the logs from this > ancient daemon, that defaulting them to stdout/stderr sounds like a bad idea > - for one sole user/reason, is too much of a change. > > If *maybe* the suggestion was to allow usage of stdout/stderr instead of > defaulting them to those, it would be a less dramatic change, but hey, > caveats are starting to appear, as Eric just pointed one out. > > Alex > >> On Jun 27, 2019, at 17:24, Eric Covener <[email protected]> wrote: >> >> >>> From my perspective it would be advantageous to have Apache write to >>> the terminal by default (i.e. no hardcoded log file locations) and >>> allow to override this behavior via the Apache configuration file. >>> Is there any reason why the default behavior is not that way yet? >> I think it's useful as opt-in, but I wouldn't want to see any >> "defaults" changed (whether that's how the code behaves in the absence >> of logging related directives, or how our default httpd.conf looks) >> >> One wrinkle I recall here is that the closing of stdout and stderr >> happens in APR (apr_proc_detach?) and it requires a new APR release to >> provide any alternate options there. >
I use -DFOREGROUND in my containers and I have always been a bit surprised that it does not make the process to duplicate log files output to stdout/stderr. Now that I see I am not alone I guess I can take a look at what would it take to add an opt-in flag for this behaviour. Would it be perhaps less intrusive to whip out a log module that could be able to tail log files to stdout/stderr when -DFOREGROUND is used? Is it possible to locate that fd from within a module? Or is that fd closed already even when -DFOREGROUND is used...? /trying to avoid depending on a new apr release/ K. Michal Karm Babacek -- Sent from my Hosaka Ono-Sendai Cyberspace 7
signature.asc
Description: OpenPGP digital signature
