RE: Exception report library
From: Robert Brewer (fumanchu_at_amor.org)
Date: 01/07/05
- Next message: Roy Smith: "Re: how to extract columns like awk $1 $5"
- Previous message: Philippe C. Martin: "Re: Tkinter: passing parameters to menu commands (looping through a list)"
- Maybe in reply to: Ian Bicking: "Exception report library"
- Next in thread: Ian Bicking: "Re: Exception report library"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 7 Jan 2005 13:37:07 -0800 To: "Ian Bicking" <ianb@colorstudy.com>, <python-list@python.org>
Ian Bicking wrote:
> I've been using one of several systems to catch unexpected exceptions
> and log them (e.g., write to a file, display on web page, email me,
> etc). But many are built into a particular system, or have an
> interesting but incomplete set of features. E.g., many web
> frameworks have exception reporters (and the stdlib includes cgitb),
> but I want to handle non-web exceptions in the same way as exceptions
> from web requests, and that's not generally easy.
...
> I feel like there must be something out there, since every Python
> programmer has to deal with this sort of thing to some degree...?
I feel that way, too, but haven't found it. I broke my webapp framework
out of my ORM late last year, and quickly realized how small the core
framework really is (22k, versus 250k for the web bits). Features like
the logging handler could be provided as separate modules, rather than
built into the Application object, and I've been meaning to get around
to that. If we could put our many heads together, I think this would be
doable for the stdlib.
Here are the pieces of the framework, by the way, which might also
benefit from some standardization (I was thinking about them all at
once):
1. Thread-safe application state
2. Logging (+ exception handling)
3. Configuration data (reading from various sources)
4. Registry of Workers for getting things done on a schedule,
possibly recurring
5. Registry of startup/shutdown functions
6. Registry of active user interfaces
I think the first three are all good candidates for a standard. If we
had a standard, thread-safe Application object, the rest could be
registerable plugins for that. You'd basically register callbacks for
app.startup and .shutdown methods to iterate over.
Robert Brewer
MIS
Amor Ministries
fumanchu@amor.org
- Next message: Roy Smith: "Re: how to extract columns like awk $1 $5"
- Previous message: Philippe C. Martin: "Re: Tkinter: passing parameters to menu commands (looping through a list)"
- Maybe in reply to: Ian Bicking: "Exception report library"
- Next in thread: Ian Bicking: "Re: Exception report library"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|