- xbt_strbuff_append(buff,"\n");
-
- app->do_append(app,buff->data);
- xbt_strbuff_free(buff);
-}
-
-/* only used after the format using: we suppose that the buffer is big enough to display our data */
-#define check_overflow \
- if (p-ev->buffer > XBT_LOG_BUFF_SIZE) { /* buffer overflow */ \
- xbt_log_layout_simple_dynamic(l,ev,fmt,app); \
- return; \
- }
-
-static void xbt_log_layout_simple_doit(xbt_log_layout_t l,
- xbt_log_event_t ev,
- const char *fmt,
- xbt_log_appender_t app) {
- char *p;
-
- xbt_assert0(ev->priority>=0,
- "Negative logging priority naturally forbidden");
- xbt_assert1(ev->priority<sizeof(xbt_log_priority_names),
- "Priority %d is greater than the biggest allowed value",
- ev->priority);
-
- if (begin_of_time<0)
- begin_of_time=gras_os_time();
-
- p = ev->buffer;
- p += snprintf(p,XBT_LOG_BUFF_SIZE-(p-ev->buffer),"[");
- check_overflow;