Logging in different thread ?

  • Thread starter Thread starter Navin Mishra
  • Start date Start date
N

Navin Mishra

Hi,

Does someone has an example of logging in a different thread ? Native
Windows API had a mechanism to send thread message(which could be used to
send a message with log data details). Does .NET has an equivalent ?

Thanks in advance and regards

Navin
 
Navin Mishra said:
Hi,

Does someone has an example of logging in a different thread ? Native
Windows API had a mechanism to send thread message(which could be used to
send a message with log data details). Does .NET has an equivalent ?

..NET has several mechanisms you can use to communicate date between threads.
This data could certainly be logging data.

For example, you could use remoting, or a properly synchronized Queue, or
just about anything in between.

You might also write your logging code to be asynchronous, so that it's fast
enough that you don't need to explicitly use a separate thread.

John Saunders
 
Thanks. Is there any example ? That'd be great!

John Saunders said:
.NET has several mechanisms you can use to communicate date between
threads. This data could certainly be logging data.

For example, you could use remoting, or a properly synchronized Queue, or
just about anything in between.

You might also write your logging code to be asynchronous, so that it's
fast enough that you don't need to explicitly use a separate thread.

John Saunders
 
Navin Mishra said:
Thanks. Is there any example ? That'd be great!

Sorry, I don't have an example of remoting or other simple inter-thread
communication.

John Saunders
 
Back
Top