ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/log.c
(Generate patch)

Comparing ircd-hybrid-8/src/log.c (file contents):
Revision 1319 by michael, Thu Mar 29 11:06:05 2012 UTC vs.
Revision 1324 by michael, Fri Mar 30 21:40:38 2012 UTC

# Line 87 | Line 87 | write_log(enum log_type type, const char
87   {
88    char buf[LOG_BUFSIZE];
89    size_t nbytes = 0;
90 +  struct tm *lt = localtime(&CurrentTime);
91  
92 <  if (ConfigLoggingEntry.timestamp)
93 <    nbytes = snprintf(buf, sizeof(buf), "[%s] %s\n",
93 <                      smalldate(CurrentTime), message);
94 <  else
95 <    nbytes = snprintf(buf, sizeof(buf), "%s\n", message);
92 >  nbytes = strftime(buf, sizeof(buf), "[%FT%H:%M:%S%z] ", lt);
93 >  nbytes += snprintf(buf+nbytes, sizeof(buf)-nbytes, "%s\n", message);
94  
95    fbputs(buf, log_type_table[type].file, nbytes);
96   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)