Event Viewer EventLog Thread-Safety

parabellum used Ask the Experts™

I want to use Event Viewer for logging of my application services. I know that i must use EventLog class.Please note that my application has several threads.

So my question is:
I am not  sure that EventLog class is thread-safe. How can i write my log entries to Event Viewer from multiple threads. Actually an example or a simple code snippet(that is thread safe) would be great.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The public static membersof EventLog are threadsafe according to MS:


Once the event source is set up, you only need EventLog.WriteEntry (which is public static).
Yes. It is thread-safe. I have done it before - years ago.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial