Changeset 14267


Ignore:
Timestamp:
Apr 28, 2014, 3:31:46 PM (8 years ago)
Author:
jordan
Message:

(trunk, libT) #5650: 'make log timestamp format configurable' -- timestamp expanded to include full date/time/tz info, patch by mike.dld

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/log.c

    r14241 r14267  
    160160  seconds = tv.tv_sec;
    161161  tr_localtime_r (&seconds, &now_tm);
    162   strftime (tmp, sizeof (tmp), "%H:%M:%S", &now_tm);
     162  strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm);
    163163  milliseconds = tv.tv_usec / 1000;
    164   tr_snprintf (buf, buflen, "%s.%03d", tmp, milliseconds);
     164  tr_snprintf (buf, buflen, tmp, milliseconds);
    165165
    166166  return buf;
Note: See TracChangeset for help on using the changeset viewer.