I am working on a project which need to log SOAP messages request. Some requests have very large string more then 14 million XML characters. Issue is when these kind of messages are send to database, these messages are not saved neither any kind of exception occur in application. I try to switch on N-Log exception property but nothing happened. You can find my configuration settings below
<targets>
<target name="main" xsi:type="AutoFlushWrapper" asyncFlush="true">
<target name="database_buffer"
xsi:type="BufferingWrapper"
bufferSize="50"
flushTimeout="120000">
<target xsi:type="FallbackGroup"
name="String"
returnToFirstOnSuccess="true">
<target xsi:type="Database"
name="database_inner"
connectionString="${event-context:item=dbConnectionString}"
commandText="INSERT INTO [Log] ([Level],[Message],[Application],[MethodInfo],[Exception]) VALUES(@Level,@Message,@ApplicationName,@MethodInfo,@Exception)">
<parameter name="@Level" layout="${level:uppercase=true}" />
<parameter name="@Message" layout="${event-properties:item=Message}" />
<parameter name="@ApplicationName" layout="${event-properties:item=SourceName}" />
<parameter name="@MethodInfo" layout="${event-properties:item=MethodInfo}" />
<parameter name="@Exception" layout="${event-properties:item=Exception}" />
</target>
</target>
</target>
</target>
</targets>
There is no internal log file created or application crash in debug mode. On the same end small strings and normal length messages are successfully going into database. In database I have Nvarchar Max datatype for column.
I can't find option here to upload file so I am attaching this link to download exact message which I am trying to save in database. Here is it.
This file text successfully insert in database when I remove Buffer and asynchronously options or I insert with Ado.net components. So please guide me the where I am wrong and what is the issue.