how to create log files by c# code. Suppose we have windows XP and our application requirement is to create system_idle logfile for performance check of the system.
and at last i will check performance in the application.

Thanks in advance...

10 Years
Discussion Span
Last Post by RaooF

Do you just want a simple text log file, or are you talking performance counters?

If you want a log file, open a stream and write to it..


Thanks Lizr

I will take help from objects(ex: system) and counters (for ex: %idle time and %processor time) and i want to create the log at runtime....


That didnt really answer the question, but once again, if you want a simple readable text file, open a stream and write it :)


I do not want deployment log like thing.. Since, i want to get system performance details, I would like the performance logger to write the log file by applying counters. If the log file is available, i will read that information into my application. So, in this scenario i have to programmatically configure the performance logger, so that it produces a log file of the system performance. I could manually configure the logger using counters and objects but I want to do it programmatically. How can I do this?

Thanks a lot for your responses...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.