If you want your own custom Error Logging you can easily write your own code. I'll give you a snippet from one of my projects.
public void SaveLogFile(object method, Exception exception)
{
string location = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\FolderName\";
try
{
//Opens a new file stream which allows asynchronous reading and writing
using (StreamWriter sw = new StreamWriter(new FileStream(location + @"log.txt", FileMode.Append, FileAccess.Write, FileShare.ReadWrite)))
{
//Writes the method name with the exception and writes the exception underneath
sw.WriteLine(String.Format("{0} ({1}) - Method: {2}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), method.ToString()));
sw.WriteLine(exception.ToString()); sw.WriteLine("");
}
}
catch (IOException)
{
if (!File.Exists(location + @"log.txt"))
{
File.Create(location + @"log.txt");
}
}
}
Then to actually write to the error log just write (q
being the caught exception)
SaveLogFile(MethodBase.GetCurrentMethod(), `q`);
Here is a list of [the built in trace listeners](http://msdn.microsoft.com/en-us/library/4y5y10s7.aspx) + [FileLogTraceListener](http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.logging.filelogtracelistener.aspx). There are many manuals over the web [like this](http://www.thejoyofcode.com/from_zero_to_logging_with_system_diagnostics_in_15_minutes.aspx), [or this one by Jeff Atwood](http://www.codinghorror.com/blog/2005/03/logging-tracelistener – HuBeZa Feb 20 '11 at 14:38