mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Add year in log.
User: "is there a reason why redis server logs are missing the year in the "date time"?" Me: "I guess I did not imagine it would be stable enough to run for several years".
This commit is contained in:
parent
15be174cf1
commit
3c19ae941d
@ -357,7 +357,7 @@ void serverLogRaw(int level, const char *msg) {
|
|||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
nolocks_localtime(&tm,tv.tv_sec,server.timezone,server.daylight_active);
|
nolocks_localtime(&tm,tv.tv_sec,server.timezone,server.daylight_active);
|
||||||
off = strftime(buf,sizeof(buf),"%d %b %H:%M:%S.",&tm);
|
off = strftime(buf,sizeof(buf),"%d %b %Y %H:%M:%S.",&tm);
|
||||||
snprintf(buf+off,sizeof(buf)-off,"%03d",(int)tv.tv_usec/1000);
|
snprintf(buf+off,sizeof(buf)-off,"%03d",(int)tv.tv_usec/1000);
|
||||||
if (server.sentinel_mode) {
|
if (server.sentinel_mode) {
|
||||||
role_char = 'X'; /* Sentinel. */
|
role_char = 'X'; /* Sentinel. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user