Giter VIP home page Giter VIP logo

firelogger.py's Introduction

firelogger.py's People

Contributors

arachnid avatar bslatkin avatar coagulant avatar darwin avatar meatballhat avatar oxyum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

firelogger.py's Issues

middleware WSGI

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

WSGIMiddleware fails in the trunk

On trunk, the WSGI middleware fails for output_wrapper

Changing to:
output = list(app_iter)
from:
output = outer_wrapper(app_iter)
works

Exception WSGI/Django 1.1

Exception exceptions.AttributeError: "'FirePythonWSGI' object has no attribute '_handler'" in <bound method FirePythonWSGI.del of <firepython.middleware.FirePythonWSGI object at 0x8704f4c>> ignored
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/core/servers/basehttp.py", line 279, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/core/servers/basehttp.py", line 651, in call
return self.application(environ, start_response)
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/core/handlers/wsgi.py", line 230, in call
self.load_middleware()
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/core/handlers/base.py", line 49, in load_middleware
mw_instance = mw_class()
TypeError: init() takes at least 2 arguments (1 given)

Support python 2.3

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()

firepython.middleware.FirePythonWSGI breaks on Django 1.2 alpha 1

Here is my config:
Django version: 1.2 alpha 1 - latest trunk
MIDDLEWARE_CLASSES: firepython.middleware.FirePythonWSGI
Server: Apache 2 on Ubuntu with mod_wsgi

django.wsgi:

import os
import sys

sys.path.append(os.path.abspath(os.path.dirname(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Traceback:

[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2] mod_wsgi (pid=12287): Exception occurred processing WSGI script '/home/sasha/Projects/django/django.wsgi'.
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2] Traceback (most recent call last):
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2] Traceback (most recent call last):
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2]   File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 230, in __call__
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2]   File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 230, in __call__
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2]     self.load_middleware()
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2]   File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 49, in load_middleware
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2]     mw_instance = mw_class()
[Mon Jan 25 23:39:16 2010] [error] [client 192.168.1.2] TypeError: __init__() takes at least 2 arguments (1 given)

Firelogger not detected

I'm getting a FireLogger not detected message while running FireLogger on Mac with the Google App Engine Webapp framework. FireLogger is not receiving any messages from the application. Please see details below:

== System configuration == :
Mac OSX 10.6.6
Firefox 3.6.13
Firebug 1.6.1
Firelogger 0.9
FirePython api version 0.9

== Code: ==

import config
import cgi
import os
import sys
from firepython.middleware import FirePythonWSGI
import logging
....
from google.appengine.ext.webapp import template
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
...

def main():
application = webapp.WSGIApplication(
[('/', MainPage),
('/sign', Guestbook)],
debug=True)

application = FirePythonWSGI(application)
run_wsgi_app(application)

if name == "main":
main()

== Command Line Output == :

pigsy:dev alex$ dev_appserver.py --port=8080 helloworld/
INFO 2011-01-18 22:29:58,860 appengine_rpc.py:153] Server: appengine.google.com
INFO 2011-01-18 22:29:58,866 appcfg.py:414] Checking for updates to the SDK.
INFO 2011-01-18 22:30:01,452 appcfg.py:428] The SDK is up to date.
WARNING 2011-01-18 22:30:01,452 datastore_file_stub.py:573] Could not read datastore data from /var/folders/Uk/Uk4+q6Q4EpOZ0xEE4TqWFk+++TM/-Tmp-/dev_appserver.datastore
INFO 2011-01-18 22:30:01,579 dev_appserver_main.py:485] Running application helloworld on port 8080: http://localhost:8080
INFO 2011-01-18 22:30:04,731 config.py:9] Starting application in DEBUG mode: True
WARNING 2011-01-18 22:30:04,812 py_zipimport.py:103] Can't open zipfile /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg-info: IOError: [Errno 13] file not accessible: '/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg-info'
INFO 2011-01-18 22:30:05,024 middleware.py:61] FireLogger not detected
INFO 2011-01-18 22:30:05,039 dev_appserver.py:3317] "GET / HTTP/1.1" 200 -
INFO 2011-01-18 22:30:05,044 dev_appserver_index.py:212] Updating /Users/alex/Documents/dev/helloworld/index.yaml
INFO 2011-01-18 22:30:05,108 dev_appserver.py:3317] "GET /stylesheets/main.css HTTP/1.1" 200 -

Tutorial page

Prepare tutorial page, so people can test-drive the extension.

Also explain difference between:
x = { ... }
logging.debug(x)
logging.debug("%s" % x)
logging.debug("%s", x)

Make the logger pane persist logs across page refreshes

Right 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.