log4net AdoNetAppender RawTimeStampLayout with no millsecond

151 Views Asked by At

I have AdoNetAppender, I use the RawTimeStampLayout but no millsecond

<parameter>
    <parameterName value=":LOG_DATETIME" />
    <dbType value="DateTime" />
    <layout type="log4net.Layout.RawTimeStampLayout" />
  </parameter>

I want to know how to get the millseconds in the element. Thank you.

1

There are 1 best solutions below

0
On

I guess your miliseconds are lost when you save it into the database. Check if your LOG_Datetime column has the right type: datetime or datetime2. If not it can lose the miliseconds.