Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top