summaryrefslogtreecommitdiff
path: root/sanei/sanei_init_debug.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-02-02 17:13:01 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-02-02 17:13:01 +0100
commitffa8801644a7d53cc1c785e3450f794c07a14eb0 (patch)
tree8d72a18a9a08b9151d12badcb1c78ce06a059f62 /sanei/sanei_init_debug.c
parent1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (diff)
New upstream version 1.0.29upstream/1.0.29
Diffstat (limited to 'sanei/sanei_init_debug.c')
-rw-r--r--sanei/sanei_init_debug.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sanei/sanei_init_debug.c b/sanei/sanei_init_debug.c
index 946aee9..3cde74e 100644
--- a/sanei/sanei_init_debug.c
+++ b/sanei/sanei_init_debug.c
@@ -58,6 +58,8 @@
#include <sys/socket.h>
#endif
#include <sys/stat.h>
+#include <time.h>
+#include <sys/time.h>
#ifdef HAVE_OS2_H
# define INCL_DOS
@@ -148,7 +150,13 @@ sanei_debug_msg
}
else
{
- fprintf (stderr, "[%s] ", be);
+ struct timeval tv;
+ struct tm *t;
+
+ gettimeofday (&tv, NULL);
+ t = localtime (&tv.tv_sec);
+
+ fprintf (stderr, "[%02d:%02d:%02d.%06ld] [%s] ", t->tm_hour, t->tm_min, t->tm_sec, tv.tv_usec, be);
vfprintf (stderr, fmt, ap);
}