Redirecting Apache Logs to Stdout

Apache NiFi redirect all logs to stdout

I tried to use the solution mentioned by @Jacob Hughes changing to CONSOLE appender and adding their root levels, but couldn't make it work.

So I found out a workaround: As my main objective is just to send the output to stdout I'm using tail -f ./logs/nifi-app.log. This resolved my issue.

Redirect Perl print statement to Apache log

Using this in the Perl scripts worked:

print STDERR "my comment";

How to view or redirect php.exe's stdout to a file?

PHP usually writes to the Apache logs... did you check there?

If it isn't writing there, see what log mechanism PHP's source uses and copy that because PHP writes to apache logs :)

How does one use Apache in a Docker Container and write nothing to disk (all logs to STDIO / STDERR)?

According to the apache mailing list, you can just directly write to /dev/stdio (on Unix like systems) as that's just a regular ol' file handle. Easy! Pasting...

The most efficient answer depends on your operating system. If you're
on a UNIX like system which provides /dev/stdout and /dev/stderr (or
perhaps /dev/fd/1 and /dev/fd/2) then use those file names. If that
isn't an option use the piped output feature. For example, from my
config:

CustomLog "|/usr/sbin/rotatelogs -c -f -l -L
/private/var/log/apache2/test-access.log
/private/var/log/apache2/test-access.log.%Y-%m-%d 86400 "
krader_custom ErrorLog "|/usr/sbin/rotatelogs -c -f -l -L
/private/var/log/apache2/test-error.log
/private/var/log/apache2/test-error.log.%Y-%m-%d 86400"

Obviously you'll want to substitute another program for
/usr/sbin/rotatelogs in the example above that writes the data where
you want it to go.

https://mail-archives.apache.org/mod_mbox/httpd-users/201508.mbox/%3CCABx2=D-wdd8FYLkHMqiNOKmOaNYb-tAOB-AsSEf2p=ctd6sMdg@mail.gmail.com%3E



Related Topics



Leave a reply



Submit