0

I am using Raize CodeSite to write log lines to from a Delphi desktop application to a separate log file. All components are running on a single PC (application + Codesite)

The logging works fine, except for the date/time. The date/time which is shown in the Codesite Log viewer is sometimes EARLIER than the time the log message was sent!

TS := FormatDateTime('YYYY-MM-DD HH:NN:SS.ZZZ', NOW());     // 2019-08-20 14:22:15.780
CodeSite.Send('Log Message at ' + TS );

Which results into a log line with a (codesite-) date/time which is EARLIER than the timestamp generated in the application:

"Log message at 2019-08-20 14:22:15.780" Code site date time: 2019/08/20 14:22:15.333

Airn5475
  • 2,452
  • 29
  • 51
  • If TS is not used elsewhere, perhaps the optimiser is eliminating TS and treating the combined lines as **CodeSite.Send('Log Message at ' + FormatDateTime('YYYY-MM-DD HH:NN:SS.ZZZ', NOW()))** which could produce this effect. I don't know that as a fact.... – Dsm Aug 20 '19 at 13:14
  • It's possible that one uses the HPET to calculate time and the other uses the RTC, since there are different hardware combinations to calculate time accuracy on PCs. – Allen Drennan Aug 20 '19 at 15:13

0 Answers0