Elmah For other PHP

Multi tool use
Elmah For other PHP
Is there an Elmah equivalent for PHP in general, Symfony in particular?
4 Answers
4
Symfony comes with a logging framework that can log to file or any other backend you care to give it. From my understanding of Elmah this is about as close as you can get - there's nothing with all the features available and integrated with frameworks such as Symfony.
Please see this chapter in the Symfony book for more information on Symfony's logging capabilities.
For future reference, elmah.io can be used for PHP as well. We focus primarily on .NET, but some of our users use it for PHP as well. Take a look at the following example to start logging errors from PHP to elmah.io: https://github.com/elmahio/other-language-examples/blob/master/PHP/Logger.php
To make it clear, I'm the founder of elmah.io and elmah.io isn't affiliated with ELMAH in any way. We share the name, but the services are very different.
error_log()
writes to system log etc.
error_log()
You can search in PEAR as well...
I'd recommend PEAR::Log as recommended by @Jet, along with set_error_handler() and set_exception_handler().
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
+1 for error_log I wish I knew about it earlier before I went and rolled my own
– Jannie Theunissen
Sep 21 '11 at 6:19