7

It appears I the data binding errors can be logged via Bea Stollnitz blog entry.

How can I send Data Binding errors through log4net instead of TraceSources or at the very least route the TraceSource to log4net?

kevindaub
  • 3,293
  • 6
  • 35
  • 46

1 Answers1

5

Implement a trace listener that writes log messages with log4net. An example can be found here:

How to log Trace messages with log4net?

EDIT (Configuration Example):

 <system.diagnostics>
     <trace autoflush="true" indentsize="4">
         <listeners>
              <add name="Log4netTraceListener" type="NameSpace.YourClass, YourAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=...." />       
         </listeners>
    </trace>
 </system.diagnostics>
Community
  • 1
  • 1
Stefan Egli
  • 17,398
  • 3
  • 54
  • 75
  • That completed 1/2 of it, but what about the app.config. I couldn't the TraceListener's methods called. – kevindaub Feb 28 '11 at 23:53