async void Log__StatusChanged(Object Sender, FileLogEventArgs e) { if (e.Type == FileLogEventType.BusyStatusChanged) { UpdateControls(); } }
private void WriteMessage(string message) { using (StreamWriter writer = new StreamWriter(Filename, true)) { FileLogEventArgs e = new FileLogEventArgs { Writer = writer, Layout = Layout, Message = message }; FileLogEntry?.Invoke(this, e); if (!e.Handled) { writer.Write(message); } writer.Flush(); } }