0

I just installed log4c and log4c-devel on CentOS 6.x by yum. All works fine except the log time, it's slow for 8 hours

Following is the output of my machine:

[rafael@localhost ~]$ date
Tue Jan 14 15:17:34 CST 2014

Following is the log produced by log4c:

20140114 07:17:34.453 DEBUG    GFXLog- CTimerManager::killTimer: time id-0x0000000198c4e0.

you see, slow for 8 hours. I have setup my machine with correct time and timezone, and also keep ntpd running. I think maybe i should setup log4c timezone, but I don't know how? log4crc or code? cannot find any document about that by google.

  • After digging into the source code, I have solved the issue. Just need to replace dated to dated_local in log4crc configure file. – user3114268 Jan 14 '14 at 08:35

1 Answers1

1

I had exactly the same problem, but in Ubuntu 14.04 dated_local is not available because log4c is an older version. I wrote an update based on the latest log4c code which does not require modifying the supplied shared library.

See https://bugs.launchpad.net/ubuntu/+source/log4c/+bug/1314576

Student
  • 11
  • 1
  • 2
  • Including the explanations in your answer in addition to linking to the launchpad thread will make it even more useful (and syntax highlighting looks better on SO :) ) – MasterAM May 11 '14 at 09:47