SocketAppender question

Hello, I had a question about the design of SocketAppender. Why does the appender spawn a thread to try to connect to an unconnected socket? Could someone please explain how that is better than just trying to reconnect when a log event reaches an unconnected appender? Thanks for any information, Will

Which version of the code are you looking at? A link to the code on github would be useful. On 01.05.2013 22:33, Will Mason wrote:
Hello, I had a question about the design of SocketAppender. Why does the appender spawn a thread to try to connect to an unconnected socket? Could someone please explain how that is better than just trying to reconnect when a log event reaches an unconnected appender?
Thanks for any information, Will
-- Ceki 65% of statistics are made up on the spot

Hello, On Wed, May 1, 2013 at 3:34 PM, ceki <ceki@qos.ch> wrote:
Which version of the code are you looking at? A link to the code on github would be useful.
Oh, sorry for the lack of context. I was reading the Logback manual ( http://logback.qos.ch/manual/appenders.html), which states, "If and when the server comes back up, then event transmission will be resumed transparently. This transparent reconnection is performed by a connector thread which periodically attempts to connect to the server." I was wondering what the rationale for the connector thread was. What problem does it solve that simply attempting reconnection upon the arrival of an event would not solve? Thanks for any information, Will
On 01.05.2013 22:33, Will Mason wrote:
Hello, I had a question about the design of SocketAppender. Why does the appender spawn a thread to try to connect to an unconnected socket? Could someone please explain how that is better than just trying to reconnect when a log event reaches an unconnected appender?
Thanks for any information, Will
-- Ceki 65% of statistics are made up on the spot ______________________________**_________________ Logback-user mailing list Logback-user@qos.ch http://mailman.qos.ch/mailman/**listinfo/logback-user<http://mailman.qos.ch/mailman/listinfo/logback-user>
participants (2)
-
ceki
-
Will Mason