How do I send all the FirePHP output to a file instead of the Firebug console?

Essentially once a site is deployed, I would like to 'flick the switch' and for the output to be sent to a log file instead of a development console.

有帮助吗?

解决方案

FirePHP is not intended to be used on production sites. The logging is only sent to the web browser. If this is left live, it can expose information that end users should not see.

What you can do is to create a class that subclasses FirePHP. Write the messages for FirePHP to the log file and then send them on to FirePHP. Give your logging class the ability to have FirePHP enabled or disabled. On deployment, disable FirePHP and have the messages only go to the log file.

其他提示

As mentioned by other post saving internals in production is not a good idea. For debugging though saving ‘Console’ panel messages to HTML file is possible using ConsoleExport addon. NetExport exists for ‘Net’ Panel. Maybe these can be reused for the FirePHP addon?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top