darwin / firepython
- Source
- Commits
- Network (12)
- Issues (0)
- Downloads (10)
- Wiki (1)
- Graphs
-
Branch:
master
-
On trunk, the WSGI middleware fails for output_wrapper
Changing to:
output = list(app_iter)from:
output = outer_wrapper(app_iter)works
Comments
-
Using 0.7 on the client and 0.5 on the server
So for example if I log a URL that has a %20 in it:
http://myurl.com/someurl?key=my%20value
It shows up like this:
Comments
First parameter is always formatting string, percentage has a special meaning, javascript tries to replace it with parameter, you have two options:
1) logging.debug("%s", mystring)
2) replace all occurences of % in mystring for %% (aka escaping) and do logging.debug(mystring)in future version I will fix this case, and don't replace percentages which have no remaining parameters
natethelen
Mon Oct 19 11:12:52 -0700 2009
| link
Neither of these work because they mess up the messages in the files. I have the firepython logger as a 2nd log output.
natethelen
Mon Oct 19 14:33:23 -0700 2009
| link
I have tried going into the _prepare_log_record function in middleware.py and do #2 above, but it just shows up as 2: "undefined""undefined" in the firebug logger
fixed in http://github.com/darwin/firelogger/commit/f75a4b6b859614417886fa121f02fdb9a9bb882e
you can test it by checking out appstats branch and using rake to build XPI
-
I did the following:
- install firepython and jsonpickle
- add firepython.middleware.FirePythonDjango and firepython.middleware.FirePythonWSGI to MIDDLEWARE_CLASSES.
My setup is the following:
- django 1.1 - manage.py run as a thread
- lighttpd with fcgi enabled
Everything works fine without FirePython but I really want to use that great debug tool. When I add the 2 classes, all http request passed to manage.py timeout.
manage.py is up and running but seems to not handle any requests anymore.
Any help would be appreciated.
Laurent Luce
Comments
I'm sorry, django is really not an area of my expertise
btw. why are you adding both Django and WSGI into MIDDLEWARE_CLASSES?
you should add there only Django which should do all the magicSorry, I got confused with the term WSGI. I thought I needed that middleware too. Removing it did the trick, it is working fine now. Thanks.
-
Hi, it looks like your plugin breaks with firebug 1.4: https://addons.mozilla.org/it/firefox/addon/11090
Comments
-
I'm using django (which support py23) it in a RHEL 4 and cannot upgrade python. Path follows:
--- firepython\middleware.py Tue May 12 10:12:32 2009 UTC +++ firepython\middleware.py Tue Jun 16 22:06:02 2009 UTC @@ -146,7 +146,7 @@ errors.append(self._handle_internal_exception(e)) chunks = self._encode(logs, errors, profile) - guid = "%08x" % random.randint(0,0xFFFFFFFFL) + guid = "%08x" % random.randint(0,0xFFFFFFFF) for i, chunk in enumerate(chunks): add_header('FireLogger-%s-%d' % (guid, i), chunk) @@ -356,17 +356,16 @@ self._start() # run app try: - try: - app = self._profile_wrap(self._app) - app_iter = app(environ, faked_start_response) - output = list(app_iter) - except Exception: - logging.exception(sys.exc_info()[1]) - raise - except: - logging.warning("DeprecationWarning: raising a string exception is deprecated") - logging.exception(sys.exc_info()[0]) - raise + app = self._profile_wrap(self._app) + app_iter = app(environ, faked_start_response) + output = list(app_iter) + except Exception: + logging.exception(sys.exc_info()[1]) + raise + except: + logging.warning("DeprecationWarning: raising a string exception is deprecated") + logging.exception(sys.exc_info()[0]) + raise finally: # Output the profile first, so we can see any errors in profiling. profile = self._prepare_profile()Comments
-
FirePython ua-string might be blocked by some websites
1 comment Created 7 months ago by fcurellaFirePython add 'X-FirePython/0.1' to the user-agent string.
Some websites (eg. wordreference.com) prevent bot access blocking user-agent with 'Python' in the useragent string.
Comments
This was already fixed in v0.3
http://github.com/darwin/firelogger/commit/aaeb68c4034f066e88d206b47b6e0649beadee77
-
Make the logger pane persist logs across page refreshes
1 comment Created 8 months ago by darwinRight now if the page does a submit, the logger pane gets cleared. It would be useful to have history available (for server side generated redirects mainly).
I'm using it with pylons and emacs, and it totally kicks ass! Thanks for the awesome extension.
-- aaditya sood
Comments





firepython needs to consume whole WSGI response, then set headers and then send whole output, reverting piranha's merge, closed by 3a2d27c