Jump to content

incorrect time in log file


OldPike

Recommended Posts

I'm redirecting output into utorrent.log using the "-logfile path/utorrent.log" switch on the command-line. It works, but the times at the beginning of each line are off. At first I though it was off by a timezone or two, but the minutes are off significantly as well.

Any ideas??

Thanks!

Link to comment
Share on other sites

Do you know where that time is coming from?

The date comes from time(). The time, on those platforms that support a POSIX monotonic clock, unfortunately comes from that clock. The platforms not supporting a POSIX monotonic clock are in better shape, since the time there comes from gettimeofday().

I think this happened when some work was done to organize time access for other things, like uTP. There aren't any tests on logging that examine the time stamps for sanity.

I'll work on this; a log message should show the system's date and time at the time the message was generated. I'll probably add a test to check for sanity on log time stamps as part of this work. This will benefit other products besides uTorrent Server.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...