private static void OutToServer(object sender, LogEvent e)
        {
            if (_tcpClient == null)
            {
                SheduleReconnect();
                return;
            }
            byte[] data = e.Serialize();
            _tcpClientLocker.EnterReadLock();
            try
            {
                _tcpClient.Send(new MessagePacket(data).GetBytesForTransfer());
            }
            catch (Exception ex)
            {
                _logger.Error("Error while sending\r\n" + ex);
            }
            finally
            {
                _tcpClientLocker.ExitReadLock();
            }

        }
        private static void OutToHttpServer(object sender, LogEvent e)
        {
            byte[] data = e.Serialize();
            Uri url = new Uri("http://lit-karmazin:80/Temporary_Listen_Addresses/postbinary");
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.ServicePoint.Expect100Continue = false;
            request.ServicePoint.ConnectionLimit = 2;
            request.ServicePoint.UseNagleAlgorithm = false;
            request.KeepAlive = true;
            request.Method = "POST";
            Stream requestStream = request.GetRequestStream();
            requestStream.Write(data, 0, data.Length);
            requestStream.Flush();
            requestStream.Close();
            
            try
            {
                request.GetResponse();
                requestStream.Dispose();
               
            }
            catch (Exception ex)
            {

                Console.WriteLine(ex);
            }

        }