I would recommend to use the log4net framework, instead of writing your own custom logging solution. You can visit the log4net website, here: http://logging.apache.org/log4net/index.html
Follow the documentation to set it up, and check out the examples they have. With it, you can log to the console, to the debug window, to an XML file, and even to the Windows Event Log.
Tekmaven
Software Architect
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
Your question seems a bit ambiguous. Did you mean creating a log file, as Tekmaven gave you a suggestion on how to do it, or do you simply want a message to be shown (like: Good morning John, it is 08:15 AM) at your program startup?
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661