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.

Changes between Version 4 and Version 5 of FirePHP


Ignore:
Timestamp:
Aug 4, 2008, 4:29:27 PM (16 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FirePHP

    v4 v5  
    1010
    1111This 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.
     12
     13It 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:
     14
     15{{{
     16#!python
     17import logging
     18from diva.ext.firephp import FirePHPHandler
     19
     20logging.root.setLevel(logging.DEBUG)
     21
     22logfile = logging.FileHandler('/var/log/myapp/python.log')
     23logfile.setLevel(log_level)
     24logfile.setFormatter(logging.Formatter('%(asctime)s %(levelname)-8s %(message)s'))
     25logging.root.addHandler(logfile)
     26
     27firephp = FirePHPHandler()
     28firephp.setLevel(logging.DEBUG)
     29logging.root.addHandler(firephp)
     30}}}
     31