I have a C# console application. It is gathering info from several data sources and centralising them in another. Occasionally, it hits some bugs - connection strings stop working; schemas change etc.
At the moment, I am simply printing out debug information using Console.WriteLine();
- this is obviously an awful idea...not least because the application is a scheduled task running every night, so I never see this debug information anyway!
What should I do to allow for simple debugging when the program fails? What is my best practice in this case ?
Thanks very much.