Code Coverage by Clover.NET

Add column names to tab seperated Message in log

by IvoP :: Rate this Message:

Reply to Author | View in Thread

Hi,

I'm trying to add columns to a tab seperated message string in a logfile. Is this possible.
I managed to add the columns for the general variables, but not for the message.

This is my config file:

  <target name="paginaModuleFile" xsi:type="File" >
      <layout xsi:type="CSVLayout" delimiter="Tab" >
        <column name="Logger" layout="${logger}" />
        <column name="SessionId" layout="${aspnet-sessionid}" />
        <column name="var1" layout="${message}" />
        <column name="var2"  />
        <column name="var3"  />
        <column name="var4"  />
      </layout>

the result file should be something like this:

Logger \t SessionId \t var1 \t var2 \t var3 \t var4
xxx \t 1233445 \t messagevalue1 \t messagevalue2 \t messagevalue3 \t

where \t is a tab.

I hope someone can help me with this.

Thanks in advance.
LightInTheBox - Buy quality products at wholesale price