Passing LogMessages from MSQM to Database Listener

Topics: Logging Application Block
Nov 12, 2010 at 10:48 AM

It is possible to pass Log Message  from MSMQ Trace Listener to DataBase Trace Listener, and if it possible , how?

Nov 14, 2010 at 10:56 PM

You mean passing messages from messages logged by an msmq trace listener to a database?  If that's what you want, you can achieve that using Entlib's Distributor Service.  See the link for steps on how to use it.   After setting it up, configure the MsmqDistributor.exe.config file so that it contains a logging category having the same name as the category of the MSMQ trace listener of your application.  That category should then use a database trace listener.  For example, say your application logs to a message queue using a MSMQ trace listener under the category named "DatabaseQueue".  Your MsmqDistributor.exe.config should also have the same category named "DatabaseQueue" which then contains a Database Trace listener.


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.