How to change log4c's default timezone?

别说谁变了你拦得住时间么 提交于 2020-01-17 01:38:06

问题


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.


回答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



来源:https://stackoverflow.com/questions/21107982/how-to-change-log4cs-default-timezone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!