summaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
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 0f42f66f..9a53775e 100644
--- a/log.c
+++ b/log.c
@@ -67,11 +67,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);