Logging Application Block 3.1

Topics: Logging Application Block
Dec 4, 2008 at 5:00 PM

Our Application logs are stored in Databases using our customized Logger. Now we are planning to use Logging Application Block v3.1. As the Logging App Block passes some pre-defined set of parameters


,@Priority int
,@Severity nvarchar(32)
,@Title nvarchar(256)
,@Timestamp datetime = null
,@MachineName varchar(64)
,@AppDomainName varchar(64)
,@ProcessID nvarchar(256)
,@ProcessName varchar(64) = null
,@ThreadName nvarchar(512)
,@Win32ThreadId nvarchar(128) = null
,@Message varchar(max)
,@FormattedMessage varchar(1024) = null
,@LogID bigint OUTPUT

We want to pass some additional parameters to our existing table. Is there a way to tell the Logging Application block to send those parameters?
If so can you please provide me some code snippet?

Thanks in Advance

Dec 5, 2008 at 2:47 AM
You would have to create your own custom tracelistener.  EntLib has a database tracelistener but since you'll be using your own database and have extra parameters, you should create your own class that would do this.

Sarah  Urmeneta
Global Technology & Solutions
Avanade, Inc.