Logging to DB

Topics: Logging Application Block
Jul 15, 2008 at 4:26 PM
I am new to EntLib, using 4.0 right now.

I am trying to configure a Listener to log to a DB log table.

Can someone show me how the WriteLog stored proc & the formatter should look like, (for example, there're message and event_id columns in the log table).
Should I have @message and @event_id in the stored proc, how would the formatter look like?
Jul 15, 2008 at 5:09 PM
Hi,

You can get a sample SQL Server table and matching stored procedure from \Blocks\Logging\Src\DatabaseTraceListener\Scripts when you install EntLibs's source code.

The formatter can be anything, as long as it produces text.

Fernando


k2so wrote:
I am new to EntLib, using 4.0 right now.

I am trying to configure a Listener to log to a DB log table.

Can someone show me how the WriteLog stored proc & the formatter should look like, (for example, there're message and event_id columns in the log table).
Should I have @message and @event_id in the stored proc, how would the formatter look like?



Jul 15, 2008 at 6:58 PM
thx

fsimonazzi wrote:
Hi,

You can get a sample SQL Server table and matching stored procedure from \Blocks\Logging\Src\DatabaseTraceListener\Scripts when you install EntLibs's source code.

The formatter can be anything, as long as it produces text.

Fernando


k2so wrote:
I am new to EntLib, using 4.0 right now.

I am trying to configure a Listener to log to a DB log table.

Can someone show me how the WriteLog stored proc & the formatter should look like, (for example, there're message and event_id columns in the log table).
Should I have @message and @event_id in the stored proc, how would the formatter look like?