Non Blocking Write's To Text File

  • Thread starter Thread starter Amy L.
  • Start date Start date
A

Amy L.

I have a console application that at any time can have multiple instances of
it running. I want to log information form each of these instances into one
central log file. However, I am concerned that when appending data to the
log file that each instance might lock the log file and block the other
instances until it is finished writing to the file. Is there anything in
System.IO that can help alleviate this issue (i.e not locking the file)? Or
is the basic nature of TextWriter not exhibit this issue.

Thanks
Amy
 
Amy said:
I have a console application that at any time can have multiple instances of
it running. I want to log information form each of these instances into one
central log file. However, I am concerned that when appending data to the
log file that each instance might lock the log file and block the other
instances until it is finished writing to the file. Is there anything in
System.IO that can help alleviate this issue (i.e not locking the file)? Or
is the basic nature of TextWriter not exhibit this issue.

Thanks
Amy
Hi Amy,

You might want to consider using Log4Net, it is a very flexible, open
source logging solution for .NET, based on Log4J.

This is the URL: http://logging.apache.org/log4net/

Regards,

Bennie Haelen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top