A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
name the threads, plus debugs (ways too much for now)
[simgrid.git]
/
src
/
xbt
/
xbt_log_layout_format.c
diff --git
a/src/xbt/xbt_log_layout_format.c
b/src/xbt/xbt_log_layout_format.c
index
27ac36b
..
190d5dc
100644
(file)
--- a/
src/xbt/xbt_log_layout_format.c
+++ b/
src/xbt/xbt_log_layout_format.c
@@
-11,8
+11,8
@@
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "gras/virtu.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "gras/virtu.h"
+#include "xbt/synchro.h" /* xbt_thread_self */
#include <stdio.h>
#include <stdio.h>
-#include "xbt/ex_interface.h" /* backtraces */
extern const char *xbt_log_priority_names[7];
extern const char *xbt_log_priority_names[7];
@@
-37,7
+37,8
@@
static char *xbt_log_layout_format_doit(xbt_log_layout_t l,
handle_modifier:
switch (*q) {
case '\0':
handle_modifier:
switch (*q) {
case '\0':
- THROW1(arg_error,0,"Layout format (%s) ending with %%",(char*)l->data);
+ fprintf(stderr,"Layout format (%s) ending with %%\n",(char*)l->data);
+ abort();
case '%':
*p++ = '%';
break;
case '%':
*p++ = '%';
break;
@@
-79,7
+80,11
@@
static char *xbt_log_layout_format_doit(xbt_log_layout_t l,
precision = -1;
}
break;
precision = -1;
}
break;
- case 't': /* process name; LOG4J compliant (thread name) */
+ case 't': /* thread name; LOG4J compliant */
+ p += sprintf(p, "%p", xbt_thread_self());
+ precision = -1;
+ break;
+ case 'P': /* process name; SimGrid extension */
if (precision == -1)
p += sprintf(p, "%s", xbt_procname());
else {
if (precision == -1)
p += sprintf(p, "%s", xbt_procname());
else {
@@
-139,7
+144,7
@@
static char *xbt_log_layout_format_doit(xbt_log_layout_t l,
e.bt_strings = NULL;
e.msg=NULL;
e.remote=0;
e.bt_strings = NULL;
e.msg=NULL;
e.remote=0;
- xbt_
ex_setup_backtrace
(&e);
+ xbt_
backtrace_current
(&e);
if (*q=='B') {
if (precision == -1)
p += sprintf(p,"%s",e.bt_strings[2]+8);
if (*q=='B') {
if (precision == -1)
p += sprintf(p,"%s",e.bt_strings[2]+8);
@@
-191,8
+196,9
@@
static char *xbt_log_layout_format_doit(xbt_log_layout_t l,
break;
default:
break;
default:
- THROW2(arg_error,0,"Unknown %%%c sequence in layout format (%s)",
- *q,(char*)l->data);
+ fprintf(stderr,"Unknown %%%c sequence in layout format (%s)\n",
+ *q,(char*)l->data);
+ abort();
}
q++;
} else {
}
q++;
} else {