[The PHP] Processing the error_log log () function and configuration using

1.error_log($message,$message_type,$destination,$extra_headers)函数,


2.message_type is 0, the location information is transmitted to the php.ini error_log arranged
  under cli environment here: /etc/php/7.0/cli/php.ini

  

 

  Under fpm environment: /etc/php/7.0/fpm/pool.d/www.conf php_admin_value [error_log] = /var/log/php_errors.log attention permissions and php-fpm user runs this file

  

 

4.message_type is 1:
  error_log ( "xxxx!", 1, "[email protected]"); // sent directly to the mailbox, you need to configure the postfix and sendmail php.ini

  Package mounting portion directly under the sendmail configuration and postfix fpm and cli

  

  

 

 

 

3.message_type 3 is the third parameter is sent to the specified file

4.message_type 4 is sent directly to the SAPI log handler, such as the return to the Nginx, can be seen in error_log nginx configuration.

  

Guess you like

Origin www.cnblogs.com/liliuguang/p/12558990.html