Re: shell script - disable log output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> test.php 2> /var/log/test

> I don't really need it to log into a file, but I wanted to prevent it
> from echoing to the screen.

test.php 2> /dev/null

You might even be able to put 2> /dev/null at the end of your #! line...

#!/usr/local/bin/php -q 2> /dev/null

But I dunno if that's gonna work...

> It seems that the extern lib I use should use trigger_error() (or
> user_error()) function instead, which is the traditional way to report
> user-defined errors.

An awful lot of scriptes use die() and error_log() when they should be
using trigger_error()...
http://php.net/trigger_error

die must die. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux