From: Arnaud Giersch Date: Thu, 22 Nov 2012 17:03:02 +0000 (+0100) Subject: We want host name here, not process name. X-Git-Tag: v3_9_rc1~91^2~47^2~21 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f60438a0ee6d4be0f37c9d66f2c1cf3d4eb8812d We want host name here, not process name. --- diff --git a/src/xbt/xbt_log_layout_format.c b/src/xbt/xbt_log_layout_format.c index e4ebf8d8da..5d03f6ff34 100644 --- a/src/xbt/xbt_log_layout_format.c +++ b/src/xbt/xbt_log_layout_format.c @@ -12,6 +12,7 @@ #include "xbt/strbuff.h" #include "xbt/log_private.h" #include "xbt/synchro.h" /* xbt_thread_self_name */ +#include "simgrid/simix.h" /* SIMIX_host_self_get_name */ #include "surf/surf.h" #include @@ -126,7 +127,7 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l, show_string(xbt_log_priority_names[ev->priority]); break; case 'h': /* host name; SimGrid extension */ - show_string(xbt_os_procname()); + show_string(SIMIX_host_self_get_name()); break; case 't': /* thread name; LOG4J compliant */ show_string(xbt_thread_self_name()); diff --git a/src/xbt/xbt_log_layout_simple.c b/src/xbt/xbt_log_layout_simple.c index c6acdc94b7..84571d6a86 100644 --- a/src/xbt/xbt_log_layout_simple.c +++ b/src/xbt/xbt_log_layout_simple.c @@ -11,6 +11,7 @@ #include "xbt/log_private.h" #include "xbt/synchro.h" /* xbt_thread_name */ +#include "simgrid/simix.h" /* SIMIX_host_self_get_name */ #include "surf/surf.h" #include #include "portable.h" @@ -42,12 +43,12 @@ static int xbt_log_layout_simple_doit(xbt_log_layout_t l, procname = xbt_procname(); if (procname && *procname) { len = snprintf(p, rem_size, "%s:%s:(%d) ", - xbt_os_procname(), procname, xbt_getpid()); + SIMIX_host_self_get_name(), procname, xbt_getpid()); check_overflow(len); } else if (!procname) { len = snprintf(p, rem_size, "%s::(%d) ", - xbt_os_procname(), xbt_getpid()); + SIMIX_host_self_get_name(), xbt_getpid()); check_overflow(len); }