new EventLogTraceListener(String name)
using System;
using System.Diagnostics;
using System.Collections;
using System.Data;
using System.Text;
public class MainClass{
public static void Main(){
Trace.Listeners.Clear(); // clear all listeners
Trace.Listeners.Add(new EventLogTraceListener("BugRiddenLog"));
Debug.Assert(1 == 0,"Error!","Error: 1 == 0");
}
}
Related examples in the same category