Hi there
I have a couple of questions regarding AdoNetAppender, which I am using
to log to a SQL Server database.
(1)
Can someone explain the use of the "date-time" parameter? For example, I
try this:
<parameter>
<parameterName value="@log_date" />
<dbType value="DateTime" />
<layout type="log4net.Layout.PatternLayout" value="%date{yyyy-MM-dd
HH:mm:ss,fff}" />
</parameter>
But I get no output. If I remove the fff then I do get log output, but
no milliseconds. Is it because SQL Server cannot save milliseconds?
Also, what is the format actually for - SQL Server shows the date/time
in its own format, nothing to do with what I specify?
(2)
How do ensure the "order" of the log outputs in the database table? I
mean if I just select from the log table how do I know what order the
log output was written to the table? Can log4net auto-generate an
incrementing id (I think I did see this mentioned somewhere, but now I
can't find the link again...)? Or is there another way?
Thanks,
Peter