Hello, I'm not sure if this is possible using only log4net infrastructure.
But you can use trigger on the logging table, which splits message text and 
writes individual parts into individual columns.
Radovan Raszka

-----Původní zpráva-----
Od: bhupigs [mailto:bhupendra.pa...@hotmail.com] 
Odesláno: 8. prosince 2010 1:43
Komu: log4net-user@logging.apache.org
Předmět: Split a Message


Hi,

I have a third party application which uses log4net.So I have access only to 
the config file. 

I have enabled using adonetappender and then redirecting my messages to a SQL 
table.
However I need help with this.
The applcaition output message has five parts seperated by colons ":". 
I want to be able to put these five parts in five columns in my SQL table.
My current coversion pattern puts the message as it is in one column.

Here is a snippet of my Log4net.config file.

<commandText value="INSERT INTO logtable(Message) VALUES (@message)" />  
<parameter>
        <parameterName value="@message" />
        <dbType value="String" />
        <size value="1000" />
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%message" />
        </layout>
    </parameter>

Help..

Thanks,
Bhupi

--
View this message in context: 
http://old.nabble.com/Split-a-Message-tp30401732p30401732.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

Reply via email to