I have created a console application which transfers data from an excel sheet and transfers it to a database. I require to do logging into it.
How can i go about it? because i have absolutely no idea about how to go about it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you simply want to write text to a file as your log you can do something like the following:
Source of this code is from this article.
Here is some documentation of the StreamWriter Class.
Otherwise if you want something more you can do as others have suggested and check out Log4Net.