summaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-08-28 14:01:11 +0100
committerThomas Adam <thomas@xteddy.org>2015-08-28 14:01:11 +0100
commit84eabb2658f9ad1bec81344aa425f66a903c931d (patch)
tree98c743d4888d1414884ec418d1eaf354c9a07213 /log.c
parent31c027a37a18d11acdc5a1bc96c871dd0139744d (diff)
parent675def039652e69d8fd5f229eff2128116e1d328 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'log.c')
-rw-r--r--log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/log.c b/log.c
index 066165e8..9afeb2ae 100644
--- a/log.c
+++ b/log.c
@@ -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);