close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 5 (modified by cmlenz, 14 years ago) (diff)



FirePHP is a (somewhat badly named) 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 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.


This functionality is implemented by the module diva.ext.firephp. It requires simplejson to be installed.

It is implemented by a custom logging handler for the 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:

import logging
from diva.ext.firephp import FirePHPHandler


logfile = logging.FileHandler('/var/log/myapp/python.log')
logfile.setFormatter(logging.Formatter('%(asctime)s %(levelname)-8s %(message)s'))

firephp = FirePHPHandler()

Attachments (1)

Download all attachments as: .zip