Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect Perl print statement to Apache log

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?

like image 444
Bizmarck Avatar asked Oct 23 '12 18:10

Bizmarck


1 Answers

Using this in the Perl scripts worked:

print STDERR "my comment";
like image 163
Bizmarck Avatar answered Sep 22 '22 02:09

Bizmarck