You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Ceki Gülcü <ce...@qos.ch> on 2004/05/27 14:45:27 UTC

UDPAppender connector thread?

Hello Kevin, Scott,

While looking at the UDPAppender code, I noticed that a connector
thread could be associated with UDPAppender. However, since UDP is a
connectionless protocol, there is no way to know that a sent packet
was delivered. In particular, the absence of a receiver on the remote
side will not be signalled. Thus, in practice the connector thread will
never be launched and serves no useful purpose. Can you imagine a case
where the connector thread could be activated and provide any sort of
error-recovery functionality? If not, I would like to simply remove
the code related to the connector thread.

On a different register, when sending over packets the UDPAppender
creates a large amount of padding data.

    StringBuffer buf = new StringBuffer(layout.format(event).trim());
    if (buf.length() < PACKET_LENGTH) {
      buf.append(new char[PACKET_LENGTH - buf.length()]);
    }

Such padding should not be necessary.

I am looking forward for your input.

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org