Send errors to stderr instead of stdout |
Hi,
Is there a way to send PHP/CI4.5 generated errors to stderr instead of stdout ? For eg, I have a crontab which sends an email only when it detects content on stderr : PHP Code: */10 * * * * root php myscript.php > /dev/null Here are some examples to illustrate the different scenarii: PHP Code: public function test() => No mail sent => OK because written to stdout public function test() PHP Code: { public function test() PHP Code: { Thanks for your help, Fred
I found this may help but not sure.
Email all cron stdout+stderr output only on stderr What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-14-2024, 07:18 AM)Fred9176 Wrote: Is there a way to send PHP/CI4.5 generated errors to stderr instead of stdout ? Create your custom Exception Handler. See https://www.codeigniter.com/user_guide/g...n-handlers
Thanks for your help.
I finally found another wrapper script which fits my needs : https://stackoverflow.com/questions/4414...-0-in-bash |
Welcome Guest, Not a member yet? Register Sign In |