Log4Net: Log with UTC times

Be aware that the changes are much different when using the AdoNetAppender. In that case, you need to change the parameter settings:

<parameter>
   <parameterName value="@log_date" />
   <dbType value="DateTime" />
   <layout type="log4net.Layout.RawUtcTimeStampLayout" />
   <!--<layout type="log4net.Layout.RawTimeStampLayout" />-->
</parameter>

This change will now write the correct UTC value for the logDate field.

Leave a Comment