= FirePHP = FirePHP is a (somewhat badly named) [http://getfirebug.com/ Firebug] extension for Firefox that can show server-side log messages and data relating to a request directly in the Firebug console in the browser. See the [http://www.firephp.org/ FirePHP web site] for more information. Diva provides basic support for sending log messages to FirePHP. I'm thinking about also exposing the template data, and in general providing a function for apps to dump data to FirePHP. [[Image(firephp.png)]] This functionality is implemented by the module [source:trunk/diva/ext/firephp.py diva.ext.firephp]. It requires [http://code.google.com/p/simplejson/ simplejson] to be installed for Python versions prior to 2.6. It is implemented by a custom logging handler for the [http://docs.python.org/lib/module-logging.html logging package] from the standard library. FirePHP logging is enabled by default when you use the DevelopmentServer, but is also easy to add for other kinds of deployments, for example: {{{ #!python import logging from diva.ext.firephp import FirePHPHandler logging.root.setLevel(logging.DEBUG) logfile = logging.FileHandler('/var/log/myapp/python.log') logfile.setLevel(log_level) logfile.setFormatter(logging.Formatter('%(asctime)s %(levelname)-8s %(message)s')) logging.root.addHandler(logfile) firephp = FirePHPHandler() firephp.setLevel(logging.DEBUG) logging.root.addHandler(firephp) }}}