You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by Michael Ji <fj...@yahoo.com> on 2016/05/21 17:41:05 UTC

Log4Net remotelogging issue

Good Afternoon:
I found Log4Net stopped the App when using remotelogging. By digging into its’ source code, I found following code line will block App who use Log4Net if no UDP protocol message is returned from remote server (maybe there is a network issue that remote server doesn’t send reply back) this.Client.Send(buffer, buffer.Length, this.RemoteEndPoint);                     //IPEndPoint object will allow us to read datagrams sent from any source.                    IPEndPoint RemoteIpEndPoint_receive = this.RemoteEndPoint; //new IPEndPoint(IPAddress.Any, 0);                     // Blocks until a message returns on this socket from a remote host.                    Byte[] receiveBytes = this.Client.Receive(ref RemoteIpEndPoint_receive);                    string returnData = Encoding.ASCII.GetString(receiveBytes);  If I commented out the highlighted two lines, it runs good. So, my concerns are: 1.       Is there any side effect if we commented out these two lines? 2.       Is commented out these two line making Log4Net more robust? (since UDP is not 100% reliable by nature) 
thanks,
Michael