gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10456 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r10456 - gnunet/src/util
Date: Sat, 27 Feb 2010 13:09:30 +0100

Author: grothoff
Date: 2010-02-27 13:09:30 +0100 (Sat, 27 Feb 2010)
New Revision: 10456

Modified:
   gnunet/src/util/common_logging.c
Log:
log with pid

Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c    2010-02-27 12:09:08 UTC (rev 10455)
+++ gnunet/src/util/common_logging.c    2010-02-27 12:09:30 UTC (rev 10456)
@@ -106,7 +106,7 @@
 /**
  * Running component.
  */
-static const char *component;
+static char *component;
 
 /**
  * Minimum log level.
@@ -163,7 +163,11 @@
 {
   FILE *altlog;
 
-  component = comp;
+  GNUNET_free_non_null (component);
+  GNUNET_asprintf (&component,
+                  "%s-%d",
+                  comp,
+                  getpid());
   min_level = get_type (loglevel);
   if (logfile == NULL)
     return GNUNET_OK;
@@ -240,7 +244,7 @@
 {
   struct CustomLogger *pos;
   if (GNUNET_stderr != NULL)
-    fprintf (GNUNET_stderr, "%s %s %s %s", datestr, comp,
+    fprintf (GNUNET_stderr, "%s %s %s %s", datestr, comp, 
              GNUNET_error_type_to_string (kind), msg);
   pos = loggers;
   while (pos != NULL)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]