Tutorial :Elmah For other PHP



Question:

Is there an Elmah equivalent for PHP in general, Symfony in particular?


Solution:1

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.


Solution:2

error_log() writes to system log etc.

You can search in PEAR as well...


Solution:3

I'd recommend PEAR::Log as recommended by @Jet, along with set_error_handler() and set_exception_handler().


Solution:4

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »