浏览代码

Add year to log timestamp.

Closes GH-32
master
Marq Schneider 13 年前
父节点
当前提交
f6eef6eebf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      btpd/util.c

+ 1
- 1
btpd/util.c 查看文件

@@ -95,7 +95,7 @@ log_common(uint32_t type, const char *fmt, va_list ap)
if (type & btpd_logmask) { if (type & btpd_logmask) {
char tbuf[20]; char tbuf[20];
time_t tp = time(NULL); time_t tp = time(NULL);
strftime(tbuf, 20, "%b %e %T", localtime(&tp));
strftime(tbuf, 20, "%Y %b %e %T", localtime(&tp));
printf("%s %s: ", tbuf, logtype_str(type)); printf("%s %s: ", tbuf, logtype_str(type));
vprintf(fmt, ap); vprintf(fmt, ap);
} }


正在加载...
取消
保存