WaYdotNET Web Blogs

Il blog di Carlo Bertini e qualcosa di .NET
posts - 57, comments - 2796, trackbacks - 925

My Links

News

Tag Cloud

Article Categories

Archives

Post Categories

Image Galleries

ASP.NET

Caxxate

Sending the LINQ To SQL log to log4net

Interessante codice x poter salvare i log di Linq to Sql con log4net:

"

DataContext Log Property can be used to print generated SQL query or command in the console window as shown below:

db.Log = Console.Out;

If you want to print the SQL query in DebugView or VS Output window you may use DebugWriter class(by Kris Vandermotten) .The usage of the class is pretty simple ...

db.Log = new DebugWriter(); 

I wrote a small class that help you redirect DataContext messages to log4net .I've changed the DebugWriter and call it Log4NetWriter . The usage is still simple

db.Log = new Log4NetWriter(this.GetType()); 

As result you get formatted log4net messages that can be send to any log4net appender ."

 

Fonte (con codice):

http://devintelligence.com/blogs/netadventures/archive/2008/01/26/sending-the-linq-to-sql-log-to-log4net.aspx

Technorati Tags: ,

Print | posted on lunedì 11 febbraio 2008 18:25 |

Feedback

Gravatar

# re: Sending the LINQ To SQL log to log4net

Girls gone wild.ff
08/10/2014 07:42 | http://www.thenewton.fr
Gravatar

# re: Sending the LINQ To SQL log to log4net

Ovviamente non ricordavo di certo il post di Gianmaria.192.168.0.1
15/03/2015 13:25 | anmaria
Gravatar

# re: Sending the LINQ To SQL log to log4net

SQL query or command in the console window as shown below:
17/04/2015 09:03 | http://www.laincontournable.fr
Gravatar

# re: Sending the LINQ To SQL log to log4net


http://www.qualitycopy.nl/ Nike Air Max 90 Goedkoop
www.qualitycopy.nl/nike-air-huarache-heren.html Nike Air Huarache Heren
www.qualitycopy.nl Nike Air Huarache Heren zwart
www.qualitycopy.nl Nike Air Huarache Heren wit
www.qualitycopy.nl/nike-air-max-2017-heren.html Nike Air Max 2017 Heren
www.qualitycopy.nl Nike Air Max 2017 Heren zwart
www.qualitycopy.nl Nike Air Max 2017 Heren wit
www.qualitycopy.nl Nike Air Max 2017 Heren blauw
www.qualitycopy.nl Nike Air Max 2017 Heren grijs
www.qualitycopy.nl/nike-air-max-90-heren-wit.html Nike Air Max 90 Heren wit
www.qualitycopy.nl Nike Air Max 90 Heren groen
www.qualitycopy.nl Nike Air Max 90 Heren grijs
www.qualitycopy.nl/nike-air-max-90-heren-rood.html Nike Air Max 90 Heren rood
www.qualitycopy.nl/nike-air-max-90-heren-2017.html Nike Air Max 90 Heren 2017
www.qualitycopy.nl/nike-air-max-thea-heren.html Nike Air Max Thea Heren
www.qualitycopy.nl Nike Air Max Thea Heren wit
www.qualitycopy.nl Nike Air Max Thea Heren blauw
www.qualitycopy.nl/nike-air-max-2017-dames.html Nike Air Max 2017 Dames
www.qualitycopy.nl Nike Air Max 2017 Dames zwart
www.qualitycopy.nl Nike Air Max 2017 Dames wit
www.qualitycopy.nl Nike Air Max 2017 Dames roze
www.qualitycopy.nl Nike Air Max 2017 Dames blauw
www.qualitycopy.nl Nike Air Max 2017 Dames groen
www.qualitycopy.nl/nike-air-max-90-dames.html Nike Air Max 90 Dames
www.qualitycopy.nl/nike-air-max-90-dames-2017.html Nike Air Max 90 Dames 2017
www.qualitycopy.nl Nike Air Max Thea Dames beige
www.qualitycopy.nl/nike-air-presto-dames.html Nike Air Presto Dames
http://www.qualitycopy.nl/nike-free-5-0-dames.html Nike Free 5.0 Dames
www.qualitycopy.nl/nike-free-5-0-dames-zwart.html Nike Free 5.0 Dames zwart
www.qualitycopy.nl/nike-free-5-0-dames-grijs.html Nike Free 5.0 Dames grijs
www.qualitycopy.nl/nike-free-5-0-dames-blauw.html Nike Free 5.0 Dames blauw
www.qualitycopy.nl/nike-free-rn-flyknit-dames.html Nike Free Rn Flyknit Dames
www.qualitycopy.nl/nike-roshe-run-dames.html Nike Roshe Run Dames




17/08/2017 06:47 | Nike Roshe Run Dames
Gravatar

# re: Sending the LINQ To SQL log to log4net

NCX asli nasa.
Jual genset murah.
aplikasi keuangan.
jamu kuat tahan lama di ranjang.
Jual titan gel.
internet marketing dari nol bagi pemula .
Blu Men.
bocoran sgp.
Pesan Tas seminar.
Tas Branded Import.
usaha online menguntungkan.
TEPUNG PANCAKE.
jasa backlink.
jasa pembuatan website terbaik.
cara membuat website.
Foto prewedding makassar.
daftar poker.
Cara Mudah Membuat Bunga Dari Kertas Krep Kecil Sederhana.
service freezer Jakarta.
maxisize.
Royal Kiraz.
Sewa mobil di bali.
Sekolah Ikatan Dinas.
HP Driver Windows.
konveksi surabaya.
cara mengatasi ejakulasi dini saat berhubungan intim.
obat forex.
tas selempang wanita import branded harga murah.
software apotek terbaik.
hammer of thor.
kontraktor renovasi.
kontraktor di Jakarta Barat.
Model Kitchen set modern.
jasa desain interior di Jakarta.
Iklan baris.
Contoh PTK SD.
cara mengatasi Enjakulasi dini.
supplier vinyl lantai.
22/06/2018 18:47 | Yayan
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET