For log4net configuration .. here is my parameter
<parameter>
<parameterName value="@exception"/>
<dbType value="String"/>
<size value="8000"/>
<layout type="log4net.Layout.ExceptionLayout"/>
</parameter>
</appender>
My stored proc in ADONetAppender is installed as follows:
<commandText value="dbo.MyInsertProcName"/>
<commandType value="StoredProcedure"/>
Inside proc, the input parameter for @exception is as follows:
ALTER PROCEDURE [dbo].[MyInsertProcName]
(
@log_date DATETIME
, @log_level VARCHAR(50)
, @logger VARCHAR(255)
, @message VARCHAR(4000)
, @exception VARCHAR(MAX)
....
The stored proc procedure writes to the table "MYTable", the length of the column "Exception" as VARCHAR 8000.
I can create an entry in "MYTable", but this entry does not contain the entire trace of the exception stack after creating the entry. It looks like the stack trace is truncated and only contains up to 1700 characters.
What is the best way to register a full stack trace in a database in log4net?
What am I missing?
Please, help.
thank