diff options
Diffstat (limited to 'src/info.cc')
| -rw-r--r-- | src/info.cc | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/src/info.cc b/src/info.cc index 4278326..56d1dfd 100644 --- a/src/info.cc +++ b/src/info.cc @@ -31,6 +31,9 @@  /*   * $Log$ + * Revision 1.2  2005/06/14 12:29:40  deva + * Incorporated the use of the Info object everywhere... also using the log functionality. + *   * Revision 1.1  2005/06/13 20:38:19  deva   * Added some logfile code.   * Enhanced the file object... now ready to hook into mov_encoder @@ -40,6 +43,8 @@  #include <config.h>  #include "info.h" +#include <time.h> +  Info::Info() {    pthread_mutex_init (&mutex, NULL);  } @@ -65,7 +70,12 @@ void Info::log(char *fmt, ...)    va_end(argp);    time_t t = time(NULL); -  fprintf(fp, "%s miav[%d]", ctime(&t), buf, getpid()); +  char sdate[32]; +  memset(sdate, 0, sizeof(sdate)); +  strftime(sdate, sizeof(sdate), "%d %b %H:%M:%S", localtime(&t)); + +  fprintf(fp, "%s miav[%d] %s\n", sdate, getpid(), buf); +  fprintf(stderr, "%s miav[%d] %s\n", sdate, getpid(), buf);    fclose(fp); | 
