Logging Application Block with External Data source

Topics: Logging Application Block
Nov 28, 2009 at 3:38 AM

Hello ,

     I am using Enterprise lib 4.1 Oct release for my application. I am using it sucessfully for text file but when I try to use it with my sql server database as a log store. I am unable to find any documentation on how to do it. I tried stored proc.  but I am faild to store my log into the database. No exception is thrown nor any log is recorded into database. Can anyone assist me with any article or walkthrough in this regards?

 

    Thanking you,

 

Nilkanth Desai

 

Dec 1, 2009 at 4:09 AM

Hi,

You may try these steps:

  1. Run the sql script to create the logging database, it can be found in the Souce installation folder of Ent lib: <Drive Letter>\EntLib41Src\Blocks\Logging\Src\DatabaseTraceListener\Scripts

In your config file, do the ff(using the config tool):

  1. Add a Logging Application Block.
  2. Add a category (optional, you may use the existing).
  3. Configure a connection string that will use the logging database that was created by running the script.
  4. Add a Database Trace listener and configure its properties.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com