Tuesday, 13 August 2013

How to do logging in console application

How to do logging in console application

I have a simple console application that will be deployed as a scheduled
job. Below is its pseudo code
Main(string[] args)
{
//get xml string from database
Reports reports = ReportsDB.GetReport(args[0].ToString());
//Generate xml file using xmwriter
//post the file to sftp site
}
I was wondering how to include logging functionality for this job. Also,
will it be suffice to use a text writer to write to text file every time
it is run or use libraries such as log4net

No comments:

Post a Comment