简体   繁体   English

将Perl打印语句重定向到Apache日志

[英]Redirect Perl print statement to Apache log

We have a Java web application running on Apache that calls Perl scripts in certain use cases. 我们有一个在Apache上运行的Java Web应用程序,它在某些用例中调用Perl脚本。 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. 我希望能够将Perl脚本的打印语句(默认情况下打印到STDOUT)重定向到Apache日志。

What is the best way to do this? 做这个的最好方式是什么?

在Perl脚本中使用它:

print STDERR "my comment";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM