X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fbaca65f9e2d00fa1d658bb71472f255052a4998..14c1a28fbdd2bde4f727adfbd4745cc60995c8a3:/src/xbt/log_default_appender.c diff --git a/src/xbt/log_default_appender.c b/src/xbt/log_default_appender.c index 4c703a5190..6a04917f13 100644 --- a/src/xbt/log_default_appender.c +++ b/src/xbt/log_default_appender.c @@ -9,7 +9,6 @@ #include "xbt/sysdep.h" #include "xbt/log.h" -#include "xbt/error.h" #include #include "gras/virtu.h" @@ -38,9 +37,17 @@ xbt_log_appender_t xbt_log_default_appender = &xbt_log_appender_file; static const char* xbt_logappender_verbose_information(void) { static char buffer[256]; - - sprintf(buffer,"%s:%s:(%d) %g", gras_os_myname(), - xbt_procname(),gras_process_getpid(),gras_os_time()); + static double begin_of_time = -1; + + if (begin_of_time<0) + begin_of_time=gras_os_time(); + + if(strlen(xbt_procname())) + sprintf(buffer,"%s:%s:(%d) %g", gras_os_myname(), + xbt_procname(),gras_os_getpid(),gras_os_time()-begin_of_time); + else + buffer[0]=0; + return buffer; }