On Mon, 2011-08-29 at 13:14 -0700, Ben Sizer wrote:
> Hi all, I just started another Pyramid project with my WebFaction
> account, and am having problems debugging it because there's not much
> information being logged, as far as I can tell.
> 
> I set up a view/route like this, based loosely on the Wiki example:
> 
>     config.add_route('all_libs', '/all_libs')
>     config.add_view(views.view_all_libraries, 'all_libs',
> renderer='myapp:templates/view_libraries.pt')
> 
> I start the app like this:
> 
>     ./bin/paster serve development.ini
> 
> Then I visit /all_libs with my browser, but instead of seeing my page,
> I get this:
> 
>     404 Not Found
>     The resource could not be found.
> 
>     /all_libs
> 
> Obviously I've done something wrong, but the main issue is that I
> don't have any diagnostic info to help out. I have set [logger_root]
> to DEBUG level and left it outputting to the console, but I get no
> useful log output associated with this 404 response. Each request logs
> a line like this:
> 
>     DEBUG [paste.httpserver.ThreadPool][MainThread] Added task (0
> tasks queued)
> 
> ...but I get nothing else. If the request is successful (eg. to the
> root of the app, which I left in place from the default quickstart)
> then I get several more of those lines but again, nothing useful
> telling me who made a request, what page was served, which view or
> route was taken, etc. I'd have expected that sort of info at the DEBUG
> level.
> 
> So my questions are:
> 
> a) Can you see what I'm doing wrong in order for it to not pick up my
> view?
> b) Can I get my 404 errors to output something more useful?
> c) Can I get Pyramid to log something about HTTP requests and explain
> why they succeed or fail?

https://docs.pylonsproject.org/projects/pyramid/1.2/narr/environment.html#debugging-not-found-errors

I can't see much wrong with your route/view pair, so you might try
running in that debug mode.  There are other various debug switches
documented there too.

- C


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to