Reputation: 4800
Does PHP have built-in debugging logging like Ruby on Rails logger.info() to a development.log file?
With PHP I'd like to look "under the hood" to see what's going on... pages served, query string values, etc.
I've Googled a bunch but can't find anything.
(I'm trying to port a web app from RoR to PHP because I need more execution speed.)
Upvotes: 1
Views: 1001
Reputation: 317177
PHP has
error_log
— Sends an error message to the web server's error log, a TCP port or to a file andtrigger_error
— Generates a user-level error/warning/notice messagewhich you can use to trigger and log the predefined error types, e.g.
trigger_error( "Custom Warning", E_USER_WARNING );
Third party libraries exists with
You can configure various destinations to log to. Usage is via an OO interface:
$logger->log('Informational message', Zend_Log::INFO);
and there is also the Log4J inspired
Apart from that there is XDebug and Zend Debugger. There is also a PECL extension with Advanced PHP Debugger (APD)
Upvotes: 7