[Python-ideas] Adding exception logging function to syslog module.
Eric Smith
eric at trueblade.com
Wed Mar 24 23:24:46 CET 2010
Sean Reifschneider wrote:
> On 03/23/2010 02:24 PM, Eric Smith wrote:
>> On second thought, maybe it would be better to optionally chain to the
>> existing sys.excepthook instead of assuming it writes to stderr. The
>> above code would become:
>
> That looks just great. I understand you're leaving tomorrow, so I'll
> probably try converting it to C while you're away. I expect I should be
> able to find some time. I'll make an issue for it if you haven't already,
> and submit it for review there.
>
> I don't imagine it will be too hard, but I haven't really done any C API
> hacking at the level of creating an inner function. I should be able to
> figure it out though.
>
> Thanks, and have a good trip.
Thanks, Sean.
It's issue 8214, you should already be nosy on it. I used a slightly
different method there, designed to remove a reference to sys.excepthook
if not chaining, but the principle is the same.
I'm not sure about the closure aspect of this in C. You could do it with
a global variable, but I'm not wild about that. Maybe you can ask on
python-dev for suggestions.
I'll be checking email occasionally while I'm away.
--
Eric.
More information about the Python-ideas
mailing list