X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/037955e458fb05c8ad1a1bdc3509bac0664f87a2..652f57a8ad22d3b0194df708c7049be37d7d3074:/src/xbt/xbt_log_layout_simple.c diff --git a/src/xbt/xbt_log_layout_simple.c b/src/xbt/xbt_log_layout_simple.c index 5933bf9ab0..9185cb2e5d 100644 --- a/src/xbt/xbt_log_layout_simple.c +++ b/src/xbt/xbt_log_layout_simple.c @@ -9,16 +9,15 @@ #include "xbt/sysdep.h" #include "xbt/log.h" +#include "xbt/synchro.h" /* xbt_thread_name */ #include "gras/virtu.h" #include extern const char *xbt_log_priority_names[7]; - -static char *xbt_log_layout_simple_doit(xbt_log_layout_t l, - xbt_log_event_t ev, - const char *fmt) { - static char res[1024]; +static void xbt_log_layout_simple_doit(xbt_log_layout_t l, + xbt_log_event_t ev, + const char *fmt) { static double begin_of_time = -1; char *p; @@ -31,8 +30,8 @@ static char *xbt_log_layout_simple_doit(xbt_log_layout_t l, if (begin_of_time<0) begin_of_time=gras_os_time(); - p = res; - p += sprintf(res,"[");; + p = ev->buffer; + p += sprintf(p,"[");; /* Display the proc info if available */ if(strlen(xbt_procname())) p += sprintf(p,"%s:%s:(%d) ", @@ -56,7 +55,6 @@ static char *xbt_log_layout_simple_doit(xbt_log_layout_t l, /* End it */ p += sprintf(p, "\n"); - return res; } xbt_log_layout_t xbt_log_layout_simple_new(char *arg) {