문제

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