X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0835a762194309626ce9912541f7770c691d9169..ccf56140eb0b973a50ce9a981fa3e38667748495:/src/xbt/log.c diff --git a/src/xbt/log.c b/src/xbt/log.c index 80b97c1cfc..d2a7b97449 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -339,11 +339,12 @@ Here are the existing format directives: - %%p: Priority name (LOG4J compliant) - %%h: Hostname (SimGrid extension) - - %%t: Process name (LOG4J compliant -- thread name in LOG4J) - - %%I: Process PID (SimGrid extension) + - %%P: Process name (SimGrid extension) + - %%t: Thread "name" (LOG4J compliant -- actually the address of the thread in memory) + - %%i: Process PID (SimGrid extension -- this is a 'i' as in 'i'dea) - %%F: file name where the log event was raised (LOG4J compliant) - - %%l: location where the log event was raised (LOG4J compliant, like '%%F:%%L') + - %%l: location where the log event was raised (LOG4J compliant, like '%%F:%%L' -- this is a l as in 'l'etter) - %%L: line number where the log event was raised (LOG4J compliant) - %%M: function name (LOG4J compliant -- called method name here of course). Defined only when using gcc because there is no __FUNCTION__ elsewhere. @@ -480,7 +481,7 @@ const char *xbt_log_priority_names[8] = { "CRITICAL" }; -XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT) = { +s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT) = { 0, 0, 0, "root", xbt_log_priority_uninitialized, 0, NULL, 0 @@ -571,7 +572,7 @@ void _xbt_log_event_log( xbt_log_event_t ev, const char *fmt, ...) { va_start(ev->ap, fmt); vfprintf(stderr,fmt,ev->ap); va_end(ev->ap); - xbt_backtrace_display(); + xbt_backtrace_display_current(); return; } @@ -580,8 +581,8 @@ void _xbt_log_event_log( xbt_log_event_t ev, const char *fmt, ...) { xbt_log_appender_t appender = cat->appender; if (appender != NULL) { xbt_assert1(cat->layout,"No valid layout for the appender of category %s",cat->name); - char *str= cat->layout->do_layout(cat->layout, ev, fmt); - appender->do_append(appender, str); + cat->layout->do_layout(cat->layout, ev, fmt); + appender->do_append(appender, ev->buffer); } if (!cat->additivity) break;