X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/4c543dbd3fbaf27f47b59f214fc8c96816a8769a..bdf387c7ef7d9c2c30c06a1c26583e1326504a94:/client/ui.c diff --git a/client/ui.c b/client/ui.c index cfaec6a5..87fede08 100644 --- a/client/ui.c +++ b/client/ui.c @@ -25,7 +25,10 @@ void PrintAndLog(char *fmt, ...) va_list argptr, argptr2; static FILE *logfile = NULL; static int logging = 1; - + // time_t current_time; + // struct tm* tm_info; + // char buffer[26] = {0}; + // lock this section to avoid interlacing prints from different threats pthread_mutex_lock(&print_lock); @@ -63,6 +66,16 @@ void PrintAndLog(char *fmt, ...) } if (logging && logfile) { + + /* + // Obtain current time. + current_time = time(NULL); + // Convert to local time format. + tm_info = localtime(¤t_time); + strftime(buffer, 26, "%Y-%m-%d %H:%M:%S", tm_info); + fprintf(logfile, "%s ", buffer); + */ + vfprintf(logfile, fmt, argptr2); fprintf(logfile,"\n"); fflush(logfile); @@ -77,7 +90,7 @@ void PrintAndLog(char *fmt, ...) } void SetLogFilename(char *fn) { - logfilename = fn; + logfilename = fn; } void iceIIR_Butterworth(int *data, const size_t len){