[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-user
Subject:    AdoNetAppender questions
From:       "Peter A. Kirk" <pk () alpha-solutions ! dk>
Date:       2006-04-28 12:45:10
Message-ID: 5C243BD898DAAF45813B837ADC5B866B37E0E0 () alpha-srv200 ! as1 ! alphasolutions ! dk
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic