private void OnInactivityTimer(object state) { var separator = new SoapCsvMessageLoggerFields { Time = GetTime(), Location = "-----##------", SoapAction = "-----##------", RequestContentLength = "-----##------", ResponseContentLength = "-----##------", RequestMiliseconds = "-----##------" }; this.LogMessage(separator); }
private void LogMessage(SoapCsvMessageLoggerFields data) { string messageText = string.Join( MessagePartSeparator, data.Time, data.Location, data.SoapAction, data.RequestContentLength, data.ResponseContentLength, data.RequestMiliseconds) + MessageSeparator; byte[] messageBytes = Encoding.UTF8.GetBytes(messageText); lock (syncLock) { this.logStream.Write(messageBytes, 0, messageBytes.Length); this.logStream.Flush(); } }