From: Jordan Lee Date: Mon, 28 Apr 2014 15:31:46 +0000 (+0000) Subject: (trunk, libT) #5650: 'make log timestamp format configurable' -- timestamp expanded... X-Git-Tag: 2.83~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b00b90c48c9bb7889d11ad3d168dc06fa89a6a60;p=transmission (trunk, libT) #5650: 'make log timestamp format configurable' -- timestamp expanded to include full date/time/tz info, patch by mike.dld --- diff --git a/libtransmission/log.c b/libtransmission/log.c index 2fc9fea01..096a55952 100644 --- a/libtransmission/log.c +++ b/libtransmission/log.c @@ -159,9 +159,9 @@ tr_logGetTimeStr (char * buf, int buflen) seconds = tv.tv_sec; tr_localtime_r (&seconds, &now_tm); - strftime (tmp, sizeof (tmp), "%H:%M:%S", &now_tm); + strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm); milliseconds = tv.tv_usec / 1000; - tr_snprintf (buf, buflen, "%s.%03d", tmp, milliseconds); + tr_snprintf (buf, buflen, tmp, milliseconds); return buf; }