I am designing an application and it runs different components each on a different thread. I need a way to report back to the user interface the state of those components and the tasks they complete and if any errors occurred. My first approach was to write from all the different components to a log file. And then I monitored that file for changes, to reload the changes in a text box (my output window). However I noticed that using file monitor does not perform very well, and it slows downs the component threads and their tasks. So I was thinking to create something like the output windows in vs2010, where they can log any data while debugging, it seems to be very efficient, and can hold a lot of data. Any ideas what would be the best approach? One important fact, is that there should be a way to communicate all the component threads with the logging output window, to display results, avoid collisions, etc. I am using .NET 4.0
I am designing an application and it runs different components each on a different
Share
I think you can just improve your idea with writing to the log file, just do it async, so you will not block the thread.
You can use something like NLog or log4net.