PHP - Logging

php

https://www.loggly.com/ultimate-guide/php-logging-basics/
http://phpmaster.com/logging-with-psr-3-to-improve-reusability/
http://phpmaster.com/implementing-psr-3-with-log4php

log_errors = On
error_reporting = E_ALL
error_log = /var/log/php.log

We can leave the error_log commented out with:

;error_log = filename

and by default, the log messages would be logged to /etc/httpd/logs/error_log or /var/log/httpd/error_log

To log an object to the error log:

error_log( print_r( $object, true ) );
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License