diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-08-28 14:01:11 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-08-28 14:01:11 +0100 |
commit | 84eabb2658f9ad1bec81344aa425f66a903c931d (patch) | |
tree | 98c743d4888d1414884ec418d1eaf354c9a07213 /log.c | |
parent | 31c027a37a18d11acdc5a1bc96c871dd0139744d (diff) | |
parent | 675def039652e69d8fd5f229eff2128116e1d328 (diff) |
Merge branch 'obsd-master'
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -68,11 +68,13 @@ void log_vwrite(const char *msg, va_list ap) { char *fmt; + time_t t; if (log_file == NULL) return; - if (asprintf(&fmt, "%s\n", msg) == -1) + t = time(NULL); + if (asprintf(&fmt, "%lld %s\n", (long long)t, msg) == -1) exit(1); if (vfprintf(log_file, fmt, ap) == -1) exit(1); |