Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: SnubbingTheSnorkeling aka Interception logging

$
0
0
@IDisposable Thanks for providing feedback. The idea behind the Log property is to provide a very easy to use default logging mechanism. However, this is just a façade on top of several building blocks. So, for example, if the formatting doesn't work for you, then change it--I blogged about this today: http://blog.oneunicorn.com/2013/05/09/ef6-sql-logging-part-2-changing-the-contentformatting/

Likewise, the IDbCommandInterception interface exists so that you can plug into anything without it needing to use a TextWriter at all. I have a blog post that I plan to publish in the next few days that shows how this can be used to integrate with NLog.

So, unless I am missing something, I believe that the current design allows everything that you are asking for, although possibly organized slightly differently.

It's also worth noting that we decided in the design meeting today to investigate changing the TextWriter to a delegate to remove the tight coupling that exists here without making it significantly more difficult to use.

With regard to Scale and Precision, this is just the way that DbParameter was implemented in the ADO.NET code--nobody seems to know why. It's possible that the next version of the .NET Framework will fix this.

Thanks,
Arthur

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>