Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log WPF Data Binding Errors With Log4Net

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?

like image 747
kevindaub Avatar asked Feb 27 '11 14:02

kevindaub


1 Answers

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>
like image 81
Stefan Egli Avatar answered Sep 28 '22 13:09

Stefan Egli