logging.SocketHandler connections

Vinay Sajip vinay_sajip at yahoo.co.uk
Fri Nov 16 09:31:03 EST 2007


On Nov 15, 3:23 pm, oj <ojee... at gmail.com> wrote:
> However, initially, I had tried it with a server that closed the
> connection after receiving each record, and the SocketHandler doesn't
> seem to behave as advertised.
>
> My test script was simply this:
>
[snip]
> The SocketHandler documentation says that it will re-establish the
> connection if it has been closed. After a bit of digging, I found a
> patch had been submitted and accepted that made it back off
> exponentially. However, this should be time based. Even if I make my
> sleep here 30 seconds, my server still only receives messages 0, 3, 6
> and 9.
>
> I'm concerned that if a connection is lost at some point, I will
> always lose at least 2 log messages.
>
> Is there some reason for this that I am not aware of? Have I
> misunderstood something, or is this a bug?

Not sure yet - can you please post your test server code? Feel free to
add it as a bug on bugs.python.org, with the code attached, and I'll
look into it. Include "logging" in the subject/summary line.

Thanks,

Vinay Sajip



More information about the Python-list mailing list