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.
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.
发布评论
评论(4)
Symfony 附带了一个日志框架,可以将日志记录到文件或您想要提供的任何其他后端。 根据我对 Elmah 的理解,这已经是你所能得到的最接近的了——没有什么东西可以提供所有功能并与 Symfony 等框架集成。
请查看 Symfony 书中的本章了解更多信息有关 Symfony 日志记录功能的信息。
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.
为了将来参考,elmah.io 也可用于 PHP。 我们主要关注 .NET,但我们的一些用户也将其用于 PHP。 看一下以下示例,开始将 PHP 错误记录到 elmah.io: https://github.com/elmahio/other-language-examples/blob/master/PHP/Logger.php
澄清一下,我是 elmah 的创始人.io 和 elmah.io 不以任何方式隶属于 ELMAH。 我们同名,但服务却截然不同。
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()
写入系统日志等。您可以在 PEAR 还有...
error_log()
writes to system log etc.You can search in PEAR as well...
我推荐 @Jet 推荐的 PEAR::Log 以及 set_error_handler() 和 set_exception_handler()。
I'd recommend PEAR::Log as recommended by @Jet, along with set_error_handler() and set_exception_handler().