Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Display the current process's name in all loggings
[simgrid.git] / src / xbt / log_default_appender.c
index dde8bda..871001e 100644 (file)
@@ -2,7 +2,7 @@
 
 /* file_appender - a dumb log appender which simply prints to stdout        */
 
-/* Copyright (c) 2004 Martin Quinson. All rights reserved.                  */
+/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -51,9 +51,9 @@ static void append_file(xbt_log_appender_t this,
                 "Priority %d is greater than the biggest allowed value",
                 ev->priority);
 
-    fprintf(stderr, "%s:%d: ", ev->fileName, ev->lineNum);
+    fprintf(stderr, "[%s] %s:%d: ", xbt_procname(), ev->fileName, ev->lineNum);
     fprintf(stderr, "[%s/%s] ", 
-           ev->cat->name, xbt_log_priority_names[ev->priority]);
+           ev->cat->name, xbt_log_priority_names[ev->priority] );
     vfprintf(stderr, fmt, ev->ap);
     fprintf(stderr, "\n");
 }