DiagnosticsTextBox is a WinForms control derived from TextBox created to display Debug and Trace output which works with multi-threaded applications. The framework of DiagnosticsTextBox is described in this post: Diagnostics TextBox
EASY TO USENo manual configuration required, just drag and drop the DiagnosticsTextBox from CodeArtEng.Diagnostics.dll to your WinForm application, it will start capture traces once your application is start.
- File writer split from DiagnosticsTextBox as standalone class, named as TraceFileWriter.
- Introduced buffer control in DiagnosticsTextBox to limit memory consumption.
TraceFileWriterTraceFileWriter is created as stand-alone file writer which output traces to selected file. This is a standalone class which is also used by DiagnosticsTextBox to output traces to file.
The TraceFileWriter class is designed to handle log writing to network path with backup mechanism to store traces in local drive during network interruption. Merging between the backup path and the target log file will be trigger automatically when connection to network is re-established. Thus, minimized data loses due to network interruption.
Both DiagnosticsTextBox and TraceFileWriter listen to TraceLogger for incoming traces.