kopia lustrzana https://gitlab.com/sane-project/backends
add timestamp to debug outputs
rodzic
3dff8085e7
commit
d9f35d1b5e
|
@ -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] [%s] ", t->tm_hour, t->tm_min, t->tm_sec, be);
|
||||
vfprintf (stderr, fmt, ap);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue