1[ConfigurationElementType(typeof(CustomTraceListenerData))]
2public class SPROCTraceListener : CustomTraceListener
3{
4 static SPROCTraceListener()
5 {
6 // get the relevant section from the config file
7 var instrumentation =
8 ConfigurationManager.GetSection("instrumentation")
9 as InstrumentationConfigSection;
10
11 // get the SPROC name and ConnectionString name
12 SPROCName = instrumentation.Database.InsertSprocName;
13 ConnectionString = ConfigurationManager.ConnectionStrings[instrumentation.Database.ConnStringName].ConnectionString;
14 }