views:

22

answers:

1

Hi,

I have been working a bit with log4net and have been inserting extra fields, but I have problems with adding int fields. Could anyone show a configuration where an int is used, since I have not been able to find it on their homepage.

I normally just use a configuration like:

 <parameter>
        <parameterName value="@orderid" />
        <dbType value="string" />
        <size value="64" />
        <layout type="log4net.Layout.PatternLayout" />
    </parameter>

But it would be more optimal for searching in the log database if this field could have been an int instead.

+1  A: 

The dbType property is of type System.Data.DbType. There, you can use the Int32 value to represent integers.

Peter Lillevold