We have a Java web application running on Apache that calls Perl scripts in certain use cases. I would like to be able to redirect the print statements of the Perl scripts (which are printing to STDOUT by default) to the Apache log.
What is the best way to do this?
Using this in the Perl scripts worked:
print STDERR "my comment";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With