View Issue Details

IDProjectCategoryView StatusLast Update
0001805GNUnetutil librarypublic2011-10-31 12:00
ReporterLRN Assigned ToLRN  
PrioritynoneSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product VersionGit master 
Summary0001805: Enhanced runtime logging granularity
DescriptionThis patch is a concept of how loglevel can be changed at runtime, and how to make all log calls available at runtime when needed, without sacrificing performance.
TagsNo tags attached.
Attached Files
0001-Now-loglevels-may-be-set-per-component-at-runtime.patch (12,739 bytes)   
From f6ce0466cdcb331fadb276a0e78df61853c53224 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Thu, 29 Sep 2011 22:44:44 +0400
Subject: [PATCH] Now loglevels may be set per-component, at runtime

* GNUNET_BOTTOM_LOGLEVEL and GNUNET_TOP_LOGLEVEL set global levels
Use bottom level to force logging to be more verbose than configured
Use top level to force logging to be less verbose than configured
Obviously, bottom <= top

* GNUNET_LOG sets per-component levels
GNUNET_LOG looks like this:
name[/bottom[/top]]/...
name starts with a non-digit character, must not include '/'
bottom and top must consist only of digits, or be empty
a description is only used if it matches the component exactly
as a special exception (for now) the name '*' matches any component
per-component loglevels override global loglevels
global levels override whatever is given via arguments or in config
Examples:
test_client/8/8/
run test_client with DEBUG level (usually leads to a timeout, by the way)

*/2/2/core/8/8/transport/4/4
run everything with WARNING, core - with DEBUG, transport - with INFO

*//1/peerinfo/4/
run everything with top loglevel ERROR, global/configured bottom loglevel,
and peerinfo - with bottom loglevel INFO and global/configured top loglevel

statistics/
does nothing

TODO:
* rework the syntax to allow for symbolic loglevel names (make levels mandatory?)
* turn _log() into _log_from() calls to get finer separation
OR
* add a component sublevel and the ability to match it
(such as "tcp:connect" or "test_client:verbose")
---
 src/include/gnunet_common.h |   54 ++++++++++-
 src/util/common_logging.c   |  229 +++++++++++++++++++++++++++++++++++++++----
 2 files changed, 260 insertions(+), 23 deletions(-)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index f484482..c14363f 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -161,6 +161,17 @@ typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind,
                                const char *component, const char *date,
                                const char *message);
 
+
+/**
+ * Minimum log level.
+ */
+extern enum GNUNET_ErrorType min_level;
+
+/**
+ * Number of log calls to ignore.
+ */
+extern unsigned int skip_log;
+
 /**
  * Main log function.
  *
@@ -169,8 +180,33 @@ typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind,
  * @param ... arguments for format string
  */
 void
-GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
+GNUNET_log_nocheck (enum GNUNET_ErrorType kind, const char *message, ...);
+
+/* from glib */
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
+#define _GNUNET_BOOLEAN_EXPR(expr)              \
+ __extension__ ({                               \
+   int _gnunet_boolean_var_;                    \
+   if (expr)                                    \
+      _gnunet_boolean_var_ = 1;                 \
+   else                                         \
+      _gnunet_boolean_var_ = 0;                 \
+   _gnunet_boolean_var_;                        \
+})
+#define GN_LIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR(expr), 1))
+#define GN_UNLIKELY(expr) (__builtin_expect (_GNUNET_BOOLEAN_EXPR(expr), 0))
+#else
+#define GN_LIKELY(expr) (expr)
+#define GN_UNLIKELY(expr) (expr)
+#endif
 
+#define GNUNET_log(kind,...) do {\
+  if (GN_UNLIKELY(skip_log > 0)) {skip_log--;}\
+  else {\
+    if (GN_UNLIKELY(((kind) & (~GNUNET_ERROR_TYPE_BULK)) <= min_level))\
+      GNUNET_log_nocheck (kind, __VA_ARGS__);\
+  }\
+} while (0)
 
 
 /**
@@ -183,9 +219,23 @@ GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
  * @param ... arguments for format string
  */
 void
-GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
+GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp,
                  const char *message, ...);
 
+#define GNUNET_log_from(kind,...) \
+do\
+{\
+  if (GN_UNLIKELY(skip_log > 0))\
+  {\
+    skip_log--;\
+  }\
+  else\
+  {\
+    if (GN_UNLIKELY(((kind) & (~GNUNET_ERROR_TYPE_BULK)) <= min_level))\
+      GNUNET_log_from_nocheck (kind, __VA_ARGS__);\
+  }\
+} while (0)
+
 
 /**
  * Ignore the next n calls to the log function.
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index ff3ac12..4eb67aa 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -117,7 +117,7 @@ static char *component;
 /**
  * Minimum log level.
  */
-static enum GNUNET_ErrorType min_level;
+enum GNUNET_ErrorType min_level;
 
 /**
  * Linked list of our custom loggres.
@@ -127,7 +127,7 @@ static struct CustomLogger *loggers;
 /**
  * Number of log calls to ignore.
  */
-static unsigned int skip_log;
+unsigned int skip_log;
 
 /**
  * File descriptor to use for "stderr", or NULL for none.
@@ -164,6 +164,191 @@ get_type (const char *log)
   return GNUNET_ERROR_TYPE_INVALID;
 }
 
+void
+process_definition (char *name, const char *comp, int blevel, int tlevel, int *bot, int *top)
+{
+  if (name[0] != '*' && strcmp (name, comp) != 0)
+    return;
+  if (blevel != -1 && blevel > *bot)
+    *bot = blevel;
+  if (tlevel != -1 && (tlevel < *top || *top < 0))
+    *top = tlevel;
+}
+
+
+/**
+ * Get a string component loglevel definition from the environment,
+ * and match @comp against it. If it matches, set @bot and @top to
+ * the values from the definition (or to defaults, if definition omits them).
+ * Definition format looks like this:
+ * name[/bottomlevel[/toplevel]]/...
+ * name must not include slashes, and must begin with a non-digit char.
+ * name may be * to indicate that this applies to all components
+ * (there is, however, no wildcard matching algorithm at the moment).
+ * bottomlevel and toplevel must be valid non-negative integers.
+ * bottomlevel and toplevel can be zero-length (useful, if you want to
+ * specify toplevel, but not bottomlevel).
+ *
+ * @param comp component name to match
+ * @param bot pointer to an integer receiving bottom log threshold
+ * @param top pointer to an integer receiving top log threshold
+ */
+static void
+get_component_log_levels (const char *comp, int *bot, int *top)
+{
+  const char *logdef;
+  char *p;
+  char *start;
+  short state;
+  char *tmp;
+  char *name = NULL;
+  int blevel, tlevel;
+  logdef = getenv ("GNUNET_LOG");
+  if (logdef == NULL)
+    return;
+  tmp = strdup (logdef);
+  for (p = tmp, state = 0, start = tmp; p[0] != '\0'; p++)
+  {
+    if (state == 0)
+    {
+      /* beginning of the string - must not be digit, and must not be slash */
+      if ((p[0] >= '0' && p[0] <= '9') || (p[0] == '/'))
+      {
+        free (tmp);
+        return;
+      }
+      blevel = -1;
+      tlevel = -1;
+      state = 1;
+      continue;
+    }
+    if (state == 1)
+    {
+      /* within a name, ends with a slash */
+      if (p[0] == '/')
+      {
+        p[0] = '\0';
+        state = 2;
+        name = start;
+        start = p + 1;
+      }
+      continue;
+    }
+    if (state == 2)
+    {
+      /* after a name there will be either another name, or bottomlevel */
+      if (p[0] >= '0' && p[1] <= '9')
+      {
+        /* bottomlevel */
+        state = 3;
+      }
+      else if (p[0] == '/')
+      {
+        blevel = -1;
+        /* bottomlevel is 0-length, look for toplevel */
+        state = 4;
+        start = p + 1;
+      }
+      else
+      {
+        state = 0;
+        start = p;
+        /* another name starts, process what we've got */
+        process_definition (name, comp, blevel, tlevel, bot, top);
+        p--;
+      }
+      continue;
+    }
+    if (state == 3)
+    {
+      /* within a bottomlevel, consists of digits, ends with a slash */
+      if (p[0] == '/')
+      {
+        p[0] = '\0';
+        if (strlen (start) > 0)
+        {
+          errno = 0;
+          blevel = strtol (start, NULL, 10);
+          if (errno != 0 || blevel < 0)
+          {
+            free (tmp);
+            return;
+          }
+        }
+        start = p + 1;
+        /* look for toplevel or for a new name */
+        state = 4;
+      }
+      else if (p[0] < '0' || p[1] > '9')
+      {
+        free (tmp);
+        return;
+      }
+      continue;
+    }
+    if (state == 4)
+    {
+      /* after a bottomlevel there will be either a new name, or toplevel */
+      if (p[0] >= '0' && p[1] <= '9')
+      {
+        /* toplevel */
+        state = 5;
+      }
+      else if (p[0] == '/')
+      {
+        tlevel = -1;
+        /* toplevel is 0-length, look for a new name */
+        state = 0;
+        start = p + 1;
+        /* process what we've got */
+        process_definition (name, comp, blevel, tlevel, bot, top);
+      }
+      else
+      {
+        state = 0;
+        start = p;
+        /* another name starts, process what we've got */
+        process_definition (name, comp, blevel, tlevel, bot, top);
+        p--;
+      }
+      continue;
+    }
+    if (state == 5)
+    {
+      /* within a toplevel, consists of digits, ends with a slash */
+      if (p[0] == '/')
+      {
+        p[0] = '\0';
+        if (strlen (start) > 0)
+        {
+          errno = 0;
+          tlevel = strtol (start, NULL, 10);
+          if (errno != 0 || tlevel < 0)
+          {
+            free (tmp);
+            return;
+          }
+        }
+        start = p + 1;
+        /* look for a new name */
+        state = 0;
+        /* another name starts, process what we've got */
+        process_definition (name, comp, blevel, tlevel, bot, top);
+      }
+      else if (p[0] < '0' || p[1] > '9')
+      {
+        free (tmp);
+        return;
+      }
+      continue;
+    }
+    free (tmp);
+    return;
+  }
+  if (state == 2)
+  {
+  }
+}
 
 /**
  * Setup logging.
@@ -180,25 +365,32 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
   int dirwarn;
   char *fn;
   const char *env_loglevel;
-  int env_minlevel = 0;
-  int env_min_force_level = 100000;
+  int env_bottom_level = 0;
+  int env_top_level = 100000;
+  int comp_bottom_level = -1;
+  int comp_top_level = -1;
 
 #ifdef WINDOWS
   QueryPerformanceFrequency (&performance_frequency);
 #endif
   GNUNET_free_non_null (component);
   GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
-  env_loglevel = getenv ("GNUNET_LOGLEVEL");
+  env_loglevel = getenv ("GNUNET_BOTTOM_LOGLEVEL");
   if (env_loglevel != NULL)
-    env_minlevel = get_type (env_loglevel);
-  env_loglevel = getenv ("GNUNET_FORCE_LOGLEVEL");
+    env_bottom_level = get_type (env_loglevel);
+  env_loglevel = getenv ("GNUNET_TOP_LOGLEVEL");
   if (env_loglevel != NULL)
-    env_min_force_level = get_type (env_loglevel);
+    env_top_level = get_type (env_loglevel);
+  get_component_log_levels (comp, &comp_bottom_level, &comp_top_level);
+  if (comp_bottom_level != -1)
+    env_bottom_level = comp_bottom_level;
+  if (comp_top_level != -1)
+    env_top_level = comp_top_level;
   min_level = get_type (loglevel);
-  if (env_minlevel > min_level)
-    min_level = env_minlevel;
-  if (env_min_force_level < min_level)
-    min_level = env_min_force_level;
+  if (env_bottom_level > min_level)
+    min_level = env_bottom_level;
+  if (env_top_level < min_level)
+    min_level = env_top_level;
   if (logfile == NULL)
     return GNUNET_OK;
   fn = GNUNET_STRINGS_filename_expand (logfile);
@@ -383,13 +575,6 @@ mylog (enum GNUNET_ErrorType kind, const char *comp, const char *message,
   char *buf;
   va_list vacp;
 
-  if (skip_log > 0)
-  {
-    skip_log--;
-    return;
-  }
-  if ((kind & (~GNUNET_ERROR_TYPE_BULK)) > min_level)
-    return;
   va_copy (vacp, va);
   size = VSNPRINTF (NULL, 0, message, vacp) + 1;
   va_end (vacp);
@@ -448,7 +633,7 @@ mylog (enum GNUNET_ErrorType kind, const char *comp, const char *message,
  * @param ... arguments for format string
  */
 void
-GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...)
+GNUNET_log_nocheck (enum GNUNET_ErrorType kind, const char *message, ...)
 {
   va_list va;
 
@@ -468,7 +653,7 @@ GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...)
  * @param ... arguments for format string
  */
 void
-GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
+GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp,
                  const char *message, ...)
 {
   va_list va;
@@ -498,6 +683,8 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind)
     return _("INFO");
   if ((kind & GNUNET_ERROR_TYPE_DEBUG) > 0)
     return _("DEBUG");
+  if ((kind & ~GNUNET_ERROR_TYPE_BULK) == 0)
+    return _("NONE");
   return _("INVALID");
 }
 
-- 
1.7.4

0002-Make-process_definition-static.patch (831 bytes)   
From df1c7736ca637ec2a902e1fb677e6098573fe5a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Fri, 30 Sep 2011 22:31:11 +0400
Subject: [PATCH 2/5] Make process_definition() static

---
 src/util/common_logging.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 4eb67aa..cb63f2f 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -164,7 +164,7 @@ get_type (const char *log)
   return GNUNET_ERROR_TYPE_INVALID;
 }
 
-void
+static void
 process_definition (char *name, const char *comp, int blevel, int tlevel, int *bot, int *top)
 {
   if (name[0] != '*' && strcmp (name, comp) != 0)
-- 
1.7.4

0003-Further-refinements-to-the-logger.patch (19,872 bytes)   
From 182cadaf7ed085e00356f6c700875aeeae9c8660 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Sat, 1 Oct 2011 18:50:52 +0400
Subject: [PATCH 3/5] Further refinements to the logger

* Added GNUNET_ERROR_TYPE_UNSPECIFIED enum value, to hold -1.
  Its corresponding string is NULL.
* Changed the logger calls as Grothoff suggested - to use static int to hold
  the result of runtime evaluation of logability.
  Logging can be unconditionally disabled in advance by defining
  GNUNET_LOG_CALL_STATUS to 0, and enabled in advance by defining it to 1.
* Added GNUNET_CULL_LOGGING, which, if defined, completely culls out all
  logging calls at compile time.
* Log definition parsing is only done once, results are cached.
* Changed definition format, now it looks like this:
  [component|*|];[file|*|];[function|*|];[from_line[-to_line]];level/[component...]
  All field separators are mandatory (but some fields could be empty or be '*').
  Line definition must be either empty or "number" or "number-number"
  Level definition must not be empty, and is a string representation
  of the level (i.e. DEBUG, WARNING, INFO, etc).
  Definition entry must end with a slash, whether or not there's another
  entry after it.
  File name is matched to the end of __FILE__, which allows file name
  to match not only the base name, but also directories leading to it.
* Removed default WARNING loglevel from program and service utility code.
  Now they default to NULL (UNSPECIFIED) level, which can be overriden by
  GNUNET_LOG definition, if no level is specified via config or commandline.
  Log levels from config or commandline are overriden by GNUNET_FORCE_LOG.
  If GNUNET_*LOG are undefined, and no levels came from config or commandline,
  logger internally defaults to WARNING level.
---
 src/include/gnunet_common.h |   51 ++++---
 src/util/common_logging.c   |  379 +++++++++++++++++++++++--------------------
 src/util/program.c          |    4 +-
 src/util/service.c          |    4 +-
 4 files changed, 238 insertions(+), 200 deletions(-)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index c14363f..5be11df 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -138,6 +138,7 @@ typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename);
  */
 enum GNUNET_ErrorType
 {
+  GNUNET_ERROR_TYPE_UNSPECIFIED = -1,
   GNUNET_ERROR_TYPE_NONE = 0,
   GNUNET_ERROR_TYPE_ERROR = 1,
   GNUNET_ERROR_TYPE_WARNING = 2,
@@ -171,7 +172,10 @@ extern enum GNUNET_ErrorType min_level;
  * Number of log calls to ignore.
  */
 extern unsigned int skip_log;
-
+#if !defined(GNUNET_CULL_LOGGING)
+int 
+get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line);
+#endif
 /**
  * Main log function.
  *
@@ -200,14 +204,9 @@ GNUNET_log_nocheck (enum GNUNET_ErrorType kind, const char *message, ...);
 #define GN_UNLIKELY(expr) (expr)
 #endif
 
-#define GNUNET_log(kind,...) do {\
-  if (GN_UNLIKELY(skip_log > 0)) {skip_log--;}\
-  else {\
-    if (GN_UNLIKELY(((kind) & (~GNUNET_ERROR_TYPE_BULK)) <= min_level))\
-      GNUNET_log_nocheck (kind, __VA_ARGS__);\
-  }\
-} while (0)
-
+#if !defined(GNUNET_LOG_CALL_STATUS)
+#define GNUNET_LOG_CALL_STATUS -1
+#endif
 
 /**
  * Log function that specifies an alternative component.
@@ -222,20 +221,32 @@ void
 GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp,
                  const char *message, ...);
 
-#define GNUNET_log_from(kind,...) \
-do\
-{\
-  if (GN_UNLIKELY(skip_log > 0))\
-  {\
-    skip_log--;\
-  }\
-  else\
-  {\
-    if (GN_UNLIKELY(((kind) & (~GNUNET_ERROR_TYPE_BULK)) <= min_level))\
-      GNUNET_log_from_nocheck (kind, __VA_ARGS__);\
+#if !defined(GNUNET_CULL_LOGGING)
+#define GNUNET_log_from(kind,comp,...) do { int log_line = __LINE__;\
+  static int log_call_enabled = GNUNET_LOG_CALL_STATUS;\
+  if (GN_UNLIKELY(log_call_enabled == -1))\
+    log_call_enabled = get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), comp, __FILE__, __FUNCTION__, log_line);\
+  if (GN_UNLIKELY(skip_log > 0)) {skip_log--;}\
+  else {\
+    if (GN_UNLIKELY(log_call_enabled))\
+      GNUNET_log_from_nocheck (kind, comp, __VA_ARGS__);\
   }\
 } while (0)
 
+#define GNUNET_log(kind,...) do { int log_line = __LINE__;\
+  static int log_call_enabled = GNUNET_LOG_CALL_STATUS;\
+  if (GN_UNLIKELY(log_call_enabled == -1))\
+    log_call_enabled = get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), NULL, __FILE__, __FUNCTION__, log_line);\
+  if (GN_UNLIKELY(skip_log > 0)) {skip_log--;}\
+  else {\
+    if (GN_UNLIKELY(log_call_enabled))\
+      GNUNET_log_nocheck (kind, __VA_ARGS__);\
+  }\
+} while (0)
+#else
+#define GNUNET_log(...)
+#define GNUNET_log_from(...)
+#endif
 
 /**
  * Ignore the next n calls to the log function.
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index cb63f2f..06f5f76 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -115,6 +115,11 @@ static char last_bulk_comp[COMP_TRACK_SIZE + 1];
 static char *component;
 
 /**
+ * Running component (without pid).
+ */
+static char *component_nopid;
+
+/**
  * Minimum log level.
  */
 enum GNUNET_ErrorType min_level;
@@ -134,6 +139,26 @@ unsigned int skip_log;
  */
 static FILE *GNUNET_stderr;
 
+struct LogDef
+{
+  char *component;
+  char *file;
+  int strlen_file;
+  char *function;
+  int from_line;
+  int to_line;
+  int level;
+  int force;
+};
+
+struct LogDef *logdefs = NULL;
+int logdefs_size = 0;
+int logdefs_len = 0;
+
+int gnunet_log_parsed = GNUNET_NO;
+int gnunet_force_log_parsed = GNUNET_NO;
+int gnunet_force_log_present = GNUNET_NO;
+
 #ifdef WINDOWS
 /**
  * Contains the number of performance counts per second.
@@ -151,6 +176,8 @@ LARGE_INTEGER performance_frequency;
 static enum GNUNET_ErrorType
 get_type (const char *log)
 {
+  if (log == NULL)
+    return GNUNET_ERROR_TYPE_UNSPECIFIED;
   if (0 == strcasecmp (log, _("DEBUG")))
     return GNUNET_ERROR_TYPE_DEBUG;
   if (0 == strcasecmp (log, _("INFO")))
@@ -163,193 +190,205 @@ get_type (const char *log)
     return GNUNET_ERROR_TYPE_NONE;
   return GNUNET_ERROR_TYPE_INVALID;
 }
+#if !defined(GNUNET_CULL_LOGGING)
+static void
+resize_logdefs ()
+{
+  logdefs_size  = (logdefs_size + 1) * 2;
+  logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));  
+}
 
 static void
-process_definition (char *name, const char *comp, int blevel, int tlevel, int *bot, int *top)
+add_definition (char *component, char *file, char *function, int from_line, int to_line, int level, int force)
 {
-  if (name[0] != '*' && strcmp (name, comp) != 0)
-    return;
-  if (blevel != -1 && blevel > *bot)
-    *bot = blevel;
-  if (tlevel != -1 && (tlevel < *top || *top < 0))
-    *top = tlevel;
+  if (logdefs_size == logdefs_len)
+    resize_logdefs ();
+  struct LogDef n;
+  memset (&n, 0, sizeof (n));
+  if (strlen (component) > 0 && component[0] != '*')
+    n.component = strdup (component);
+  if (strlen (file) > 0 && file[0] != '*')
+  {
+    n.file = strdup (file);
+    n.strlen_file = strlen (file);
+  }
+  if (strlen (function) > 0 && function[0] != '*')
+    n.function = strdup (function);
+  n.from_line = from_line;
+  n.to_line = to_line;
+  n.level = level;
+  n.force = force;
+  logdefs[logdefs_len++] = n;
+}
+
+int 
+get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line)
+{
+  struct LogDef *ld;
+  int i;
+  int force_only;
+  size_t strlen_file;
+  if (comp == NULL)
+    comp = component_nopid;
+  if (min_level >= 0 && gnunet_force_log_present == GNUNET_NO)
+    return caller_level <= min_level;
+  force_only = min_level >= 0;
+  strlen_file = strlen (file);
+  for (i = 0; i < logdefs_len; i++)
+  {
+    ld = &logdefs[i];
+    if ((!force_only || ld->force) &&
+        (caller_level <= ld->level) &&
+        (line >= ld->from_line && line <= ld->to_line) &&
+        (ld->component == NULL || strcmp (comp, ld->component) == 0) &&
+        (ld->file == NULL ||
+         (ld->strlen_file <= strlen_file &&
+          strcmp (&file[strlen_file - ld->strlen_file], ld->file) == 0)) &&
+        (ld->function == NULL || strcmp (function, ld->function) == 0)
+       )
+    {
+      return 1;
+    }
+  }
+  if (min_level >= 0)
+    return caller_level <= min_level;
+  /* All programs/services previously defaulted to WARNING.
+   * Now WE default to WARNING, and THEY default to NULL.
+   */
+  return caller_level <= GNUNET_ERROR_TYPE_WARNING;
 }
 
 
 /**
- * Get a string component loglevel definition from the environment,
- * and match @comp against it. If it matches, set @bot and @top to
- * the values from the definition (or to defaults, if definition omits them).
- * Definition format looks like this:
- * name[/bottomlevel[/toplevel]]/...
- * name must not include slashes, and must begin with a non-digit char.
- * name may be * to indicate that this applies to all components
- * (there is, however, no wildcard matching algorithm at the moment).
- * bottomlevel and toplevel must be valid non-negative integers.
- * bottomlevel and toplevel can be zero-length (useful, if you want to
- * specify toplevel, but not bottomlevel).
- *
- * @param comp component name to match
- * @param bot pointer to an integer receiving bottom log threshold
- * @param top pointer to an integer receiving top log threshold
+ * Definition format:
+ * component;file;function;from_line-to_line;level/component...
+ * All entries are mandatory, but may be empty.
+ * Empty entries for component, file and function are treated as
+ * "matches anything".
+ * Empty line entry is treated as "from 0 to INT_MAX"
+ * Line entry with only one line is treated as "this line only"
+ * Entry for level MUST NOT be empty.
+ * Entries for component, file and function that consist of a
+ * single character "*" are treated (at the moment) the same way
+ * empty entries are treated (wildcard matching is not implemented (yet?)).
+ * file entry is matched to the end of __FILE__. That is, it might be
+ * a base name, or a base name with leading directory names.
  */
-static void
-get_component_log_levels (const char *comp, int *bot, int *top)
+static int
+parse_definitions (const char *constname, int force)
 {
-  const char *logdef;
+  char *def;
+  const char *tmp;
+  char *comp = NULL;
+  char *file = NULL;
+  char *function = NULL;
   char *p;
   char *start;
+  char *t;
   short state;
-  char *tmp;
-  char *name = NULL;
-  int blevel, tlevel;
-  logdef = getenv ("GNUNET_LOG");
-  if (logdef == NULL)
-    return;
-  tmp = strdup (logdef);
-  for (p = tmp, state = 0, start = tmp; p[0] != '\0'; p++)
+  int level;
+  int from_line, to_line;
+  int counter = 0;
+  tmp = getenv (constname);
+  if (tmp == NULL)
+    return 0;
+  def = strdup (tmp);
+  level = -1;
+  from_line = 0;
+  to_line = INT_MAX;
+  for (p = def, state = 0, start = def; p[0] != '\0'; p++)
   {
-    if (state == 0)
+    switch (p[0])
     {
-      /* beginning of the string - must not be digit, and must not be slash */
-      if ((p[0] >= '0' && p[0] <= '9') || (p[0] == '/'))
+    case ';':
+      p[0] = '\0';
+      switch (state)
       {
-        free (tmp);
-        return;
-      }
-      blevel = -1;
-      tlevel = -1;
-      state = 1;
-      continue;
-    }
-    if (state == 1)
-    {
-      /* within a name, ends with a slash */
-      if (p[0] == '/')
-      {
-        p[0] = '\0';
-        state = 2;
-        name = start;
-        start = p + 1;
-      }
-      continue;
-    }
-    if (state == 2)
-    {
-      /* after a name there will be either another name, or bottomlevel */
-      if (p[0] >= '0' && p[1] <= '9')
-      {
-        /* bottomlevel */
-        state = 3;
-      }
-      else if (p[0] == '/')
-      {
-        blevel = -1;
-        /* bottomlevel is 0-length, look for toplevel */
-        state = 4;
-        start = p + 1;
-      }
-      else
-      {
-        state = 0;
-        start = p;
-        /* another name starts, process what we've got */
-        process_definition (name, comp, blevel, tlevel, bot, top);
-        p--;
-      }
-      continue;
-    }
-    if (state == 3)
-    {
-      /* within a bottomlevel, consists of digits, ends with a slash */
-      if (p[0] == '/')
-      {
-        p[0] = '\0';
+      case 0: /* within a component name */
+        comp = start;
+        break;
+      case 1:
+        /* after a component name there must be a file name */
+        file = start;
+        break;
+      case 2:
+        /* after a file name there must be a function name */
+        function = start;
+        break;
+      case 3:
+        /* after a function name there must be a from-to line definition */
         if (strlen (start) > 0)
         {
           errno = 0;
-          blevel = strtol (start, NULL, 10);
-          if (errno != 0 || blevel < 0)
+          from_line = strtol (start, &t, 10);
+          if (errno != 0 || from_line < 0)
           {
-            free (tmp);
-            return;
+            free (def);
+            return counter;
           }
+          if (t < p && t[0] == '-')
+          {
+            errno = 0;
+            start = t + 1;
+            to_line = strtol (start, &t, 10);
+            if (errno != 0 || to_line < 0 || t != p)
+            {
+              free (def);
+              return counter;
+            }
+          }
+          else
+            to_line = from_line;
         }
-        start = p + 1;
-        /* look for toplevel or for a new name */
-        state = 4;
-      }
-      else if (p[0] < '0' || p[1] > '9')
-      {
-        free (tmp);
-        return;
-      }
-      continue;
-    }
-    if (state == 4)
-    {
-      /* after a bottomlevel there will be either a new name, or toplevel */
-      if (p[0] >= '0' && p[1] <= '9')
-      {
-        /* toplevel */
-        state = 5;
-      }
-      else if (p[0] == '/')
-      {
-        tlevel = -1;
-        /* toplevel is 0-length, look for a new name */
-        state = 0;
-        start = p + 1;
-        /* process what we've got */
-        process_definition (name, comp, blevel, tlevel, bot, top);
-      }
-      else
-      {
-        state = 0;
-        start = p;
-        /* another name starts, process what we've got */
-        process_definition (name, comp, blevel, tlevel, bot, top);
-        p--;
+        else
+        {
+          from_line = 0;
+          to_line = INT_MAX;
+        }
+        break;
       }
-      continue;
-    }
-    if (state == 5)
-    {
-      /* within a toplevel, consists of digits, ends with a slash */
-      if (p[0] == '/')
+      start = p + 1;
+      state += 1;
+      break;
+    case '/':
+      switch (state)
       {
+      case 4:
+        /* after a from-to line definition there must be a level definition */
         p[0] = '\0';
-        if (strlen (start) > 0)
+        state = 0;
+        level = get_type ((const char *) start);
+        if (level == GNUNET_ERROR_TYPE_INVALID || level == GNUNET_ERROR_TYPE_UNSPECIFIED)
         {
-          errno = 0;
-          tlevel = strtol (start, NULL, 10);
-          if (errno != 0 || tlevel < 0)
-          {
-            free (tmp);
-            return;
-          }
+          free (def);
+          return counter;
         }
+        add_definition (comp, file, function, from_line, to_line, level, force);
+        counter += 1;
         start = p + 1;
-        /* look for a new name */
-        state = 0;
-        /* another name starts, process what we've got */
-        process_definition (name, comp, blevel, tlevel, bot, top);
+        break;
+      default:
+        break;
       }
-      else if (p[0] < '0' || p[1] > '9')
-      {
-        free (tmp);
-        return;
-      }
-      continue;
+    default:
+      break;
     }
-    free (tmp);
-    return;
-  }
-  if (state == 2)
-  {
   }
+  free (def);
+  return counter;
 }
 
+static void
+parse_all_definitions ()
+{
+  if (gnunet_log_parsed == GNUNET_NO)
+    parse_definitions ("GNUNET_LOG", 0);
+  gnunet_log_parsed = GNUNET_YES;
+  if (gnunet_force_log_parsed == GNUNET_NO)
+    gnunet_force_log_present = parse_definitions ("GNUNET_FORCE_LOG", 1) > 0 ? GNUNET_YES : GNUNET_NO;
+  gnunet_force_log_parsed = GNUNET_YES;
+}
+#endif
 /**
  * Setup logging.
  *
@@ -364,33 +403,18 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
   FILE *altlog;
   int dirwarn;
   char *fn;
-  const char *env_loglevel;
-  int env_bottom_level = 0;
-  int env_top_level = 100000;
-  int comp_bottom_level = -1;
-  int comp_top_level = -1;
 
+  min_level = get_type (loglevel);
+#if !defined(GNUNET_CULL_LOGGING)
+  parse_all_definitions ();
+#endif
 #ifdef WINDOWS
   QueryPerformanceFrequency (&performance_frequency);
 #endif
   GNUNET_free_non_null (component);
   GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
-  env_loglevel = getenv ("GNUNET_BOTTOM_LOGLEVEL");
-  if (env_loglevel != NULL)
-    env_bottom_level = get_type (env_loglevel);
-  env_loglevel = getenv ("GNUNET_TOP_LOGLEVEL");
-  if (env_loglevel != NULL)
-    env_top_level = get_type (env_loglevel);
-  get_component_log_levels (comp, &comp_bottom_level, &comp_top_level);
-  if (comp_bottom_level != -1)
-    env_bottom_level = comp_bottom_level;
-  if (comp_top_level != -1)
-    env_top_level = comp_top_level;
-  min_level = get_type (loglevel);
-  if (env_bottom_level > min_level)
-    min_level = env_bottom_level;
-  if (env_top_level < min_level)
-    min_level = env_top_level;
+  GNUNET_free_non_null (component_nopid);
+  component_nopid = strdup (comp);
   if (logfile == NULL)
     return GNUNET_OK;
   fn = GNUNET_STRINGS_filename_expand (logfile);
@@ -659,6 +683,9 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp,
   va_list va;
   char comp_w_pid[128];
 
+  if (comp == NULL)
+    comp = component_nopid;
+
   va_start (va, message);
   GNUNET_snprintf (comp_w_pid, sizeof (comp_w_pid), "%s-%d", comp, getpid ());
   mylog (kind, comp_w_pid, message, va);
diff --git a/src/util/program.c b/src/util/program.c
index d89b65a..b092153 100644
--- a/src/util/program.c
+++ b/src/util/program.c
@@ -210,7 +210,7 @@ GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
   cnt += sizeof (defoptions) / sizeof (struct GNUNET_GETOPT_CommandLineOption);
   qsort (allopts, cnt, sizeof (struct GNUNET_GETOPT_CommandLineOption),
          &cmd_sorter);
-  loglev = GNUNET_strdup ("WARNING");
+  loglev = NULL;
   cc.cfgfile = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE);
   lpfx = GNUNET_strdup (binaryName);
   if (NULL != (spc = strstr (lpfx, " ")))
@@ -248,7 +248,7 @@ GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
   /* clean up */
   GNUNET_CONFIGURATION_destroy (cfg);
   GNUNET_free_non_null (cc.cfgfile);
-  GNUNET_free (loglev);
+  GNUNET_free_non_null (loglev);
   GNUNET_free_non_null (logfile);
   return GNUNET_OK;
 }
diff --git a/src/util/service.c b/src/util/service.c
index dc6a733..ad74d27 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1542,7 +1542,7 @@ GNUNET_SERVICE_run (int argc, char *const *argv, const char *serviceName,
   err = 1;
   do_daemonize = 0;
   logfile = NULL;
-  loglev = GNUNET_strdup ("WARNING");
+  loglev = NULL;
   cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE);
   memset (&sctx, 0, sizeof (sctx));
   sctx.options = opt;
@@ -1611,7 +1611,7 @@ shutdown:
   GNUNET_free_non_null (sctx.addrs);
   GNUNET_free_non_null (sctx.addrlens);
   GNUNET_free_non_null (logfile);
-  GNUNET_free (loglev);
+  GNUNET_free_non_null (loglev);
   GNUNET_free (cfg_fn);
   GNUNET_free_non_null (sctx.v4_denied);
   GNUNET_free_non_null (sctx.v6_denied);
-- 
1.7.4

0004-Make-sure-that-defaults-aren-t-used-when-there-are-m.patch (1,879 bytes)   
From b2b93885c080c8d9634bbc4af33b16bbf3e3e946 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Sat, 1 Oct 2011 23:06:06 +0400
Subject: [PATCH 4/5] Make sure that defaults aren't used when there are
 matching logdefs

---
 src/util/common_logging.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 06f5f76..bbfd092 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -228,6 +228,7 @@ get_log_call_status (int caller_level, const char *comp, const char *file, const
   int i;
   int force_only;
   size_t strlen_file;
+  int matches = 0;
   if (comp == NULL)
     comp = component_nopid;
   if (min_level >= 0 && gnunet_force_log_present == GNUNET_NO)
@@ -238,7 +239,6 @@ get_log_call_status (int caller_level, const char *comp, const char *file, const
   {
     ld = &logdefs[i];
     if ((!force_only || ld->force) &&
-        (caller_level <= ld->level) &&
         (line >= ld->from_line && line <= ld->to_line) &&
         (ld->component == NULL || strcmp (comp, ld->component) == 0) &&
         (ld->file == NULL ||
@@ -247,9 +247,15 @@ get_log_call_status (int caller_level, const char *comp, const char *file, const
         (ld->function == NULL || strcmp (function, ld->function) == 0)
        )
     {
-      return 1;
+      matches += 1;
+      if (caller_level <= ld->level)
+        return 1;
     }
   }
+  /* If some rules did match, but had too low loglevel to allow logging, don't check any further */
+  if (matches > 0)
+    return 0;
+  /* Otherwise use global level, if defined */
   if (min_level >= 0)
     return caller_level <= min_level;
   /* All programs/services previously defaulted to WARNING.
-- 
1.7.4

log_measurements.ods (16,010 bytes)
0005-Be-able-to-force-log-destination.patch (1,275 bytes)   
From 6489ad5a2028bb859f09ab475164b02af093832f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Tue, 4 Oct 2011 06:58:06 +0400
Subject: [PATCH 5/8] Be able to force log destination

---
 src/util/common_logging.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 5c3e1ab..7951656 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -409,6 +409,7 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
   FILE *altlog;
   int dirwarn;
   char *fn;
+  const char *env_logfile = NULL;
 
   min_level = get_type (loglevel);
 #if !defined(GNUNET_CULL_LOGGING)
@@ -421,6 +422,11 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
   GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
   GNUNET_free_non_null (component_nopid);
   component_nopid = strdup (comp);
+
+  env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
+  if (env_logfile != NULL)
+    logfile = env_logfile;
+
   if (logfile == NULL)
     return GNUNET_OK;
   fn = GNUNET_STRINGS_filename_expand (logfile);
-- 
1.7.4

0006-Add-GNUNET_-prefix-to-get_log_call_status.patch (2,784 bytes)   
From 02df484d5b3460cc7666a802206ce647ec021745 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Tue, 4 Oct 2011 07:08:38 +0400
Subject: [PATCH 6/8] Add GNUNET_ prefix to get_log_call_status

---
 src/include/gnunet_common.h |    6 +++---
 src/util/common_logging.c   |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index fee4e11..5486990 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -174,7 +174,7 @@ extern enum GNUNET_ErrorType min_level;
 extern unsigned int skip_log;
 #if !defined(GNUNET_CULL_LOGGING)
 int
-get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line);
+GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line);
 #endif
 /**
  * Main log function.
@@ -225,7 +225,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp,
 #define GNUNET_log_from(kind,comp,...) do { int log_line = __LINE__;\
   static int log_call_enabled = GNUNET_LOG_CALL_STATUS;\
   if (GN_UNLIKELY(log_call_enabled == -1))\
-    log_call_enabled = get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), comp, __FILE__, __FUNCTION__, log_line);\
+    log_call_enabled = GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), comp, __FILE__, __FUNCTION__, log_line);\
   if (GN_UNLIKELY(skip_log > 0)) {skip_log--;}\
   else {\
     if (GN_UNLIKELY(log_call_enabled))\
@@ -236,7 +236,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp,
 #define GNUNET_log(kind,...) do { int log_line = __LINE__;\
   static int log_call_enabled = GNUNET_LOG_CALL_STATUS;\
   if (GN_UNLIKELY(log_call_enabled == -1))\
-    log_call_enabled = get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), NULL, __FILE__, __FUNCTION__, log_line);\
+    log_call_enabled = GNUNET_get_log_call_status ((kind) & (~GNUNET_ERROR_TYPE_BULK), NULL, __FILE__, __FUNCTION__, log_line);\
   if (GN_UNLIKELY(skip_log > 0)) {skip_log--;}\
   else {\
     if (GN_UNLIKELY(log_call_enabled))\
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 7951656..4001b1e 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -222,7 +222,7 @@ add_definition (char *component, char *file, char *function, int from_line, int
 }
 
 int
-get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line)
+GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line)
 {
   struct LogDef *ld;
   int i;
-- 
1.7.4

0007-Doxygen-comments-code-comment-and-small-changes.patch (9,099 bytes)   
From 51f01ea57999820ea53f620117fda63790960cda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Tue, 4 Oct 2011 07:52:56 +0400
Subject: [PATCH 7/8] Doxygen comments, code comment and small changes

Makes the trailing '/' optional (it is still required as a separator)
---
 src/util/common_logging.c |  142 ++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 127 insertions(+), 15 deletions(-)

diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 4001b1e..0d0afb0 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -139,24 +139,85 @@ unsigned int skip_log;
  */
 static FILE *GNUNET_stderr;
 
+/**
+ * Represents a single logging definition
+ */
 struct LogDef
 {
+  /**
+   * Component name. NULL means that this definition matches any component
+   */
   char *component;
+
+  /**
+   * File name. NULL means that this definition matches any file
+   */
   char *file;
+
+  /**
+   * Stores strlen(file)
+   */
   int strlen_file;
+
+  /**
+   * Function name. NULL means that this definition matches any function
+   */
   char *function;
+
+  /**
+   * Lowest line at which this definition matches.
+   * Defaults to 0. Must be <= to_line.
+   */
   int from_line;
+
+  /**
+   * Highest line at which this definition matches.
+   * Defaults to INT_MAX. Must be >= from_line.
+   */
   int to_line;
+
+  /**
+   * Maximal log level allowed for calls that match this definition.
+   * Calls with higher log level will be disabled.
+   * Must be >= 0
+   */
   int level;
+
+  /**
+   * 1 if this definition comes from GNUNET_FORCE_LOG, which means that it
+   * overrides any configuration options. 0 otherwise.
+   */
   int force;
 };
 
+/**
+ * Dynamic array of logging definitions
+ */
 struct LogDef *logdefs = NULL;
+
+/**
+ * Allocated size of logdefs array (in units)
+ */
 int logdefs_size = 0;
+
+/**
+ * The number of units used in logdefs array.
+ */
 int logdefs_len = 0;
 
+/**
+ * GNUNET_YES if GNUNET_LOG environment variable is already parsed.
+ */
 int gnunet_log_parsed = GNUNET_NO;
+
+/**
+ * GNUNET_YES if GNUNET_FORCE_LOG environment variable is already parsed.
+ */
 int gnunet_force_log_parsed = GNUNET_NO;
+
+/**
+ * GNUNET_YES if at least one definition with forced == 1 is available.
+ */
 int gnunet_force_log_present = GNUNET_NO;
 
 #ifdef WINDOWS
@@ -191,6 +252,9 @@ get_type (const char *log)
   return GNUNET_ERROR_TYPE_INVALID;
 }
 #if !defined(GNUNET_CULL_LOGGING)
+/**
+ * Utility function - reallocates logdefs array to be twice as large.
+ */
 static void
 resize_logdefs ()
 {
@@ -198,6 +262,17 @@ resize_logdefs ()
   logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));
 }
 
+/**
+ * Utility function - adds a parsed definition to logdefs array.
+ *
+ * @param component see struct LogDef, can't be NULL
+ * @param file see struct LogDef, can't be NULL
+ * @param function see struct LogDef, can't be NULL
+ * @param from_line see struct LogDef
+ * @param to_line see struct LogDef
+ * @param level see struct LogDef, must be >= 0
+ * @param force see struct LogDef
+ */
 static void
 add_definition (char *component, char *file, char *function, int from_line, int to_line, int level, int force)
 {
@@ -221,6 +296,19 @@ add_definition (char *component, char *file, char *function, int from_line, int
   logdefs[logdefs_len++] = n;
 }
 
+/**
+ * Decides whether a particular logging call should or should not be allowed
+ * to be made. Used internally by GNUNET_log*()
+ *
+ * @param caller_level loglevel the caller wants to use
+ * @param comp component name the caller uses (NULL means that global
+ *   component name is used)
+ * @param file file name containing the logging call, usually __FILE__
+ * @param function function which tries to make a logging call,
+ *   usually __FUNCTION__
+ * @param line line at which the call is made, usually __LINE__
+ * @return 0 to disallow the call, 1 to allow it
+ */
 int
 GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file, const char *function, int line)
 {
@@ -229,10 +317,18 @@ GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file
   int force_only;
   size_t strlen_file;
   int matches = 0;
+
   if (comp == NULL)
+    /* Use default component */
     comp = component_nopid;
+
+  /* We have no definitions to override globally configured log level,
+   * so just use it right away.
+   */
   if (min_level >= 0 && gnunet_force_log_present == GNUNET_NO)
     return caller_level <= min_level;
+
+  /* Only look for forced definitions? */
   force_only = min_level >= 0;
   strlen_file = strlen (file);
   for (i = 0; i < logdefs_len; i++)
@@ -247,12 +343,16 @@ GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file
         (ld->function == NULL || strcmp (function, ld->function) == 0)
        )
     {
+      /* This definition matched! */
       matches += 1;
+      /* And if it allows the call to be made, then we're finished */
       if (caller_level <= ld->level)
         return 1;
     }
   }
-  /* If some rules did match, but had too low loglevel to allow logging, don't check any further */
+  /* If some definitions did match, but had too low loglevel to allow logging,
+   * don't check any further.
+   */
   if (matches > 0)
     return 0;
   /* Otherwise use global level, if defined */
@@ -266,8 +366,10 @@ GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file
 
 
 /**
+ * Utility function - parses a definition
+ *
  * Definition format:
- * component;file;function;from_line-to_line;level/component...
+ * component;file;function;from_line-to_line;level[/component...]
  * All entries are mandatory, but may be empty.
  * Empty entries for component, file and function are treated as
  * "matches anything".
@@ -278,7 +380,13 @@ GNUNET_get_log_call_status (int caller_level, const char *comp, const char *file
  * single character "*" are treated (at the moment) the same way
  * empty entries are treated (wildcard matching is not implemented (yet?)).
  * file entry is matched to the end of __FILE__. That is, it might be
- * a base name, or a base name with leading directory names.
+ * a base name, or a base name with leading directory names (some compilers
+ * define __FILE__ to absolute file path).
+ *
+ * @param constname name of the environment variable from which to get the
+ *   string to be parsed
+ * @param force 1 if definitions found in @constname are to be forced
+ * @return number of added definitions
  */
 static int
 parse_definitions (const char *constname, int force)
@@ -295,6 +403,7 @@ parse_definitions (const char *constname, int force)
   int level;
   int from_line, to_line;
   int counter = 0;
+  int keep_looking = 1;
   tmp = getenv (constname);
   if (tmp == NULL)
     return 0;
@@ -302,27 +411,25 @@ parse_definitions (const char *constname, int force)
   level = -1;
   from_line = 0;
   to_line = INT_MAX;
-  for (p = def, state = 0, start = def; p[0] != '\0'; p++)
+  for (p = def, state = 0, start = def; keep_looking; p++)
   {
     switch (p[0])
     {
-    case ';':
+    case ';': /* found a field separator */
       p[0] = '\0';
       switch (state)
       {
       case 0: /* within a component name */
         comp = start;
         break;
-      case 1:
-        /* after a component name there must be a file name */
+      case 1: /* within a file name */
         file = start;
         break;
-      case 2:
+      case 2: /* within a function name */
         /* after a file name there must be a function name */
         function = start;
         break;
-      case 3:
-        /* after a function name there must be a from-to line definition */
+      case 3: /* within a from-to line range */
         if (strlen (start) > 0)
         {
           errno = 0;
@@ -343,10 +450,10 @@ parse_definitions (const char *constname, int force)
               return counter;
             }
           }
-          else
+          else /* one number means "match this line only" */
             to_line = from_line;
         }
-        else
+        else /* default to 0-max */
         {
           from_line = 0;
           to_line = INT_MAX;
@@ -356,11 +463,13 @@ parse_definitions (const char *constname, int force)
       start = p + 1;
       state += 1;
       break;
-    case '/':
+    case '\0': /* found EOL */
+      keep_looking = 0;
+      /* fall through to '/' */
+    case '/': /* found a definition separator */
       switch (state)
       {
-      case 4:
-        /* after a from-to line definition there must be a level definition */
+      case 4: /* within a log level */
         p[0] = '\0';
         state = 0;
         level = get_type ((const char *) start);
@@ -384,6 +493,9 @@ parse_definitions (const char *constname, int force)
   return counter;
 }
 
+/**
+ * Utility function - parses GNUNET_LOG and GNUNET_FORCE_LOG.
+ */
 static void
 parse_all_definitions ()
 {
-- 
1.7.4

0008-Add-enable-logging-configure-option.patch (1,332 bytes)   
From d2d492559c410d9c72fbbc38b7af834b754d5553 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Tue, 4 Oct 2011 14:34:11 +0400
Subject: [PATCH 8/8] Add --enable-logging configure option

---
 configure.ac |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index d212979..243b436 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,6 +193,16 @@ then
   AC_MSG_ERROR([GNUnet needs libgcrypt])
 fi
 
+extra_logging=GNUNET_NO
+AC_ARG_ENABLE([logging],
+   AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
+   [AS_IF([test "x$enableval" = "xyes"], [],
+          [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])],
+          [test "x$enableval" = "xverbose"], [extra_logging=GNUNET_YES]
+          [test "x$enableval" = "xveryverbose"], [extra_logging=\(GNUNET_YES+1\)])
+   ], [])
+AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
+
 if test $build = $target
 then
 AC_MSG_CHECKING([for working HMAC])
-- 
1.7.4

0001-Use-GNUNET_EXTRA_LOGGING-to-manage-compile-time-logg.patch (78,889 bytes)   
From 7d31df6a284485df02f177d92a6d3a79830d9e99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Tue, 4 Oct 2011 15:24:07 +0400
Subject: [PATCH] Use GNUNET_EXTRA_LOGGING to manage compile-time logging
 calls

---
 src/arm/arm.h                                      |    2 +-
 src/arm/gnunet-service-arm_interceptor.c           |    2 +-
 src/arm/test_arm_api.c                             |    2 +-
 src/arm/test_exponential_backoff.c                 |    2 +-
 src/arm/test_gnunet_service_manager.c              |    2 +-
 src/ats-test/perf_transport_ats.c                  |    2 +-
 src/ats-test/test_transport_ats_multiple_peers.c   |    2 +-
 src/ats/ats_api.c                                  |    2 +-
 src/ats/gnunet-service-transport_ats.h             |    4 ++--
 src/ats/test_ats_api.c                             |    4 ++--
 src/ats/test_ats_api_update_address.c              |    4 ++--
 src/block/plugin_block_dht.c                       |    2 +-
 src/block/plugin_block_dns.c                       |    2 +-
 src/block/plugin_block_fs.c                        |    2 +-
 src/block/plugin_block_template.c                  |    2 +-
 src/block/plugin_block_test.c                      |    2 +-
 src/block/test_block.c                             |    4 ++--
 src/chat/chat.c                                    |    2 +-
 src/chat/gnunet-service-chat.c                     |    2 +-
 src/chat/test_chat.c                               |    2 +-
 src/chat/test_chat_private.c                       |    2 +-
 src/core/core.h                                    |    4 ++--
 src/core/gnunet-service-core.c                     |    4 ++--
 src/core/test_core_api.c                           |    2 +-
 src/core/test_core_api_preferences.c               |    2 +-
 src/core/test_core_api_reliability.c               |    2 +-
 src/core/test_core_api_start_only.c                |    2 +-
 src/core/test_core_quota_compliance.c              |    4 ++--
 src/datacache/perf_datacache.c                     |    2 +-
 src/datacache/plugin_datacache_mysql.c             |    2 +-
 src/datacache/plugin_datacache_postgres.c          |    2 +-
 src/datacache/plugin_datacache_sqlite.c            |    2 +-
 src/datacache/test_datacache.c                     |    2 +-
 src/datacache/test_datacache_quota.c               |    2 +-
 src/datastore/datastore.h                          |    2 +-
 src/datastore/perf_datastore_api.c                 |    2 +-
 src/datastore/perf_plugin_datastore.c              |    2 +-
 src/datastore/plugin_datastore_mysql.c             |    2 +-
 src/datastore/plugin_datastore_postgres.c          |    2 +-
 src/datastore/plugin_datastore_sqlite.c            |    2 +-
 src/datastore/test_datastore_api.c                 |    2 +-
 src/datastore/test_datastore_api_management.c      |    2 +-
 src/datastore/test_plugin_datastore.c              |    2 +-
 src/dht/dht_api.c                                  |    2 +-
 src/dht/test_dht_api.c                             |    4 ++--
 src/dht/test_dht_multipeer.c                       |    2 +-
 src/dht/test_dht_twopeer.c                         |    2 +-
 src/dht/test_dht_twopeer_get_put.c                 |    2 +-
 src/dht/test_dht_twopeer_path_tracking.c           |    2 +-
 src/dht/test_dht_twopeer_put_get.c                 |    2 +-
 src/dv/dv.h                                        |   14 +++++++-------
 src/dv/plugin_transport_dv.c                       |    2 +-
 src/dv/test_transport_api_dv.c                     |    2 +-
 src/fragmentation/test_fragmentation.c             |    2 +-
 src/fs/fs_download.c                               |    2 +-
 src/fs/fs_namespace.c                              |    2 +-
 src/fs/fs_publish.c                                |    2 +-
 src/fs/fs_search.c                                 |    2 +-
 src/fs/fs_tree.c                                   |    2 +-
 src/fs/fs_unindex.c                                |    2 +-
 src/fs/gnunet-service-fs.h                         |    2 +-
 src/fs/gnunet-service-fs_push.c                    |    2 +-
 src/fs/perf_gnunet_service_fs_p2p.c                |    2 +-
 src/fs/perf_gnunet_service_fs_p2p_trust.c          |    2 +-
 src/fs/test_fs.c                                   |    2 +-
 src/fs/test_fs_download.c                          |    2 +-
 src/fs/test_fs_download_indexed.c                  |    2 +-
 src/fs/test_fs_download_persistence.c              |    2 +-
 src/fs/test_fs_download_recursive.c                |    2 +-
 src/fs/test_fs_file_information.c                  |    2 +-
 src/fs/test_fs_list_indexed.c                      |    2 +-
 src/fs/test_fs_namespace.c                         |    2 +-
 src/fs/test_fs_namespace_list_updateable.c         |    2 +-
 src/fs/test_fs_publish.c                           |    2 +-
 src/fs/test_fs_publish_persistence.c               |    2 +-
 src/fs/test_fs_search.c                            |    2 +-
 src/fs/test_fs_search_persistence.c                |    2 +-
 src/fs/test_fs_search_ranking.c                    |    2 +-
 src/fs/test_fs_start_stop.c                        |    2 +-
 src/fs/test_fs_test_lib.c                          |    2 +-
 src/fs/test_fs_unindex.c                           |    2 +-
 src/fs/test_fs_unindex_persistence.c               |    2 +-
 src/fs/test_gnunet_service_fs_migration.c          |    2 +-
 src/fs/test_gnunet_service_fs_p2p.c                |    2 +-
 src/hello/test_hello.c                             |    4 ++--
 src/hostlist/gnunet-daemon-hostlist.h              |    2 +-
 src/hostlist/hostlist-client.c                     |    2 +-
 src/hostlist/hostlist-server.c                     |    2 +-
 src/hostlist/test_gnunet_daemon_hostlist.c         |    2 +-
 .../test_gnunet_daemon_hostlist_learning.c         |    2 +-
 .../test_gnunet_daemon_hostlist_reconnect.c        |    2 +-
 src/nat/nat.h                                      |    2 +-
 src/nat/test_nat.c                                 |    2 +-
 src/nat/test_nat_mini.c                            |    2 +-
 src/nat/test_nat_test.c                            |    2 +-
 src/nse/gnunet-nse-profiler.c                      |    2 +-
 src/nse/nse.h                                      |    2 +-
 src/nse/test_nse_multipeer.c                       |    2 +-
 src/peerinfo/peerinfo.h                            |    2 +-
 src/statistics/statistics.h                        |    2 +-
 src/statistics/test_statistics_api.c               |    2 +-
 src/statistics/test_statistics_api_loop.c          |    2 +-
 src/statistics/test_statistics_api_watch.c         |    2 +-
 src/template/test_template_api.c                   |    2 +-
 src/testing/test_testing_connect.c                 |    2 +-
 src/testing/test_testing_group.c                   |    2 +-
 src/testing/test_testing_peergroup.c               |    2 +-
 src/testing/test_testing_topology.c                |    2 +-
 src/testing/test_testing_topology_blacklist.c      |    2 +-
 src/testing/testing.c                              |    4 ++--
 src/testing/testing_group.c                        |    6 +++---
 src/topology/test_gnunet_daemon_topology.c         |    2 +-
 .../gnunet-transport-connect-running-peers.c       |    4 ++--
 src/transport/plugin_transport_http.h              |    2 +-
 src/transport/plugin_transport_smtp.c              |    2 +-
 src/transport/plugin_transport_tcp.c               |    4 ++--
 src/transport/plugin_transport_template.c          |    2 +-
 src/transport/plugin_transport_udp.c               |    2 +-
 src/transport/plugin_transport_unix.c              |    2 +-
 src/transport/plugin_transport_wlan.c              |    6 +++---
 src/transport/test_plugin_transport.c              |    2 +-
 src/transport/test_plugin_transport_http.c         |    4 ++--
 src/transport/test_plugin_transport_https.c        |    4 ++--
 src/transport/test_plugin_transport_udp.c          |    2 +-
 src/transport/test_quota_compliance.c              |    8 ++++----
 src/transport/test_transport_api.c                 |    4 ++--
 src/transport/test_transport_api_disconnect.c      |    4 ++--
 src/transport/test_transport_api_limited_sockets.c |    4 ++--
 src/transport/test_transport_api_reliability.c     |    2 +-
 src/transport/test_transport_api_timeout.c         |    4 ++--
 src/transport/test_transport_api_unreliability.c   |    4 ++--
 .../test_transport_api_unreliability_constant.c    |    4 ++--
 src/transport/test_transport_startonly.c           |    4 ++--
 src/transport/test_transport_testing.c             |    4 ++--
 src/transport/transport.h                          |    8 ++++----
 src/util/bandwidth.c                               |    2 +-
 src/util/client.c                                  |    2 +-
 src/util/connection.c                              |    2 +-
 src/util/disk.c                                    |    4 ++--
 src/util/load.c                                    |    2 +-
 src/util/network.c                                 |    4 ++--
 src/util/resolver.h                                |    2 +-
 src/util/scheduler.c                               |    4 ++--
 src/util/server.c                                  |    2 +-
 src/util/server_mst.c                              |    2 +-
 src/util/server_nc.c                               |    2 +-
 src/util/service.c                                 |    2 +-
 src/util/test_client.c                             |    2 +-
 src/util/test_configuration.c                      |    2 +-
 src/util/test_connection.c                         |    2 +-
 src/util/test_connection_addressing.c              |    2 +-
 src/util/test_connection_receive_cancel.c          |    2 +-
 src/util/test_connection_timeout.c                 |    2 +-
 src/util/test_connection_timeout_no_connect.c      |    2 +-
 src/util/test_connection_transmit_cancel.c         |    2 +-
 src/util/test_os_start_process.c                   |    2 +-
 src/util/test_peer.c                               |    2 +-
 src/util/test_plugin.c                             |    2 +-
 src/util/test_resolver_api.c                       |    2 +-
 src/util/test_scheduler.c                          |    2 +-
 src/util/test_scheduler_delay.c                    |    2 +-
 src/util/test_server.c                             |    2 +-
 src/util/test_server_disconnect.c                  |    2 +-
 src/util/test_server_with_client.c                 |    2 +-
 src/util/test_server_with_client_unix.c            |    2 +-
 src/util/test_service.c                            |    2 +-
 src/util/test_strings.c                            |    2 +-
 src/util/test_time.c                               |    2 +-
 168 files changed, 209 insertions(+), 209 deletions(-)

diff --git a/src/arm/arm.h b/src/arm/arm.h
index af5e405..f20562c 100644
--- a/src/arm/arm.h
+++ b/src/arm/arm.h
@@ -31,6 +31,6 @@
  * This option will turn on the DEBUG loglevel for
  * all processes controlled by this ARM!
  */
-#define DEBUG_ARM GNUNET_NO
+#define DEBUG_ARM GNUNET_EXTRA_LOGGING
 
 #endif
diff --git a/src/arm/gnunet-service-arm_interceptor.c b/src/arm/gnunet-service-arm_interceptor.c
index 837f67d..24dd4ad 100644
--- a/src/arm/gnunet-service-arm_interceptor.c
+++ b/src/arm/gnunet-service-arm_interceptor.c
@@ -37,7 +37,7 @@
 #include "gnunet-service-arm.h"
 
 
-#define DEBUG_SERVICE_MANAGER GNUNET_NO
+#define DEBUG_SERVICE_MANAGER GNUNET_EXTRA_LOGGING
 
 #define BUFFER_SIZE (64 * 1024)
 
diff --git a/src/arm/test_arm_api.c b/src/arm/test_arm_api.c
index 11c245e..5fbbaa6 100644
--- a/src/arm/test_arm_api.c
+++ b/src/arm/test_arm_api.c
@@ -30,7 +30,7 @@
 #include "gnunet_program_lib.h"
 #include "gnunet_resolver_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c
index 778a4b8..ec2f454 100644
--- a/src/arm/test_exponential_backoff.c
+++ b/src/arm/test_exponential_backoff.c
@@ -28,7 +28,7 @@
 #include "gnunet_program_lib.h"
 #include "gnunet_protocols.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 #define START_ARM GNUNET_YES
 #define LOG_BACKOFF GNUNET_NO
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
diff --git a/src/arm/test_gnunet_service_manager.c b/src/arm/test_gnunet_service_manager.c
index 4f863ed..100e156 100644
--- a/src/arm/test_gnunet_service_manager.c
+++ b/src/arm/test_gnunet_service_manager.c
@@ -39,7 +39,7 @@
 
 #define START_ARM GNUNET_YES
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static int ret = 1;
 
diff --git a/src/ats-test/perf_transport_ats.c b/src/ats-test/perf_transport_ats.c
index 0be15d2..e148c93 100644
--- a/src/ats-test/perf_transport_ats.c
+++ b/src/ats-test/perf_transport_ats.c
@@ -26,7 +26,7 @@
 #include "gauger.h"
 #include <glpk.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define EXECS 5
 
diff --git a/src/ats-test/test_transport_ats_multiple_peers.c b/src/ats-test/test_transport_ats_multiple_peers.c
index fbc148e..fe31769 100644
--- a/src/ats-test/test_transport_ats_multiple_peers.c
+++ b/src/ats-test/test_transport_ats_multiple_peers.c
@@ -30,7 +30,7 @@
 #include "gauger.h"
 #include "gnunet-service-transport_ats.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define NUM_PEERS 11
 #define MEASUREMENTS 5
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c
index 633d71c..f7f3c95 100644
--- a/src/ats/ats_api.c
+++ b/src/ats/ats_api.c
@@ -33,7 +33,7 @@
 #include "platform.h"
 #include "gnunet_ats_service.h"
 
-#define DEBUG_ATS GNUNET_NO
+#define DEBUG_ATS GNUNET_EXTRA_LOGGING
 
 // NOTE: this implementation is simply supposed
 // to implement a simplistic strategy in-process;
diff --git a/src/ats/gnunet-service-transport_ats.h b/src/ats/gnunet-service-transport_ats.h
index 550f218..4af1bdc 100644
--- a/src/ats/gnunet-service-transport_ats.h
+++ b/src/ats/gnunet-service-transport_ats.h
@@ -41,8 +41,8 @@
  *  ATS defines
  */
 
-#define DEBUG_ATS GNUNET_NO
-#define VERBOSE_ATS GNUNET_NO
+#define DEBUG_ATS GNUNET_EXTRA_LOGGING
+#define VERBOSE_ATS GNUNET_EXTRA_LOGGING
 
 
 /* Minimum time between to calculations*/
diff --git a/src/ats/test_ats_api.c b/src/ats/test_ats_api.c
index 0d4d65e..42d4859 100644
--- a/src/ats/test_ats_api.c
+++ b/src/ats/test_ats_api.c
@@ -33,9 +33,9 @@
 #include "platform.h"
 #include "gnunet_ats_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/ats/test_ats_api_update_address.c b/src/ats/test_ats_api_update_address.c
index 1c6351f..556f13c 100644
--- a/src/ats/test_ats_api_update_address.c
+++ b/src/ats/test_ats_api_update_address.c
@@ -34,9 +34,9 @@
 #include "gnunet_ats_service.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/block/plugin_block_dht.c b/src/block/plugin_block_dht.c
index 331eea4..c58615b 100644
--- a/src/block/plugin_block_dht.c
+++ b/src/block/plugin_block_dht.c
@@ -31,7 +31,7 @@
 #include "gnunet_hello_lib.h"
 #include "gnunet_block_plugin.h"
 
-#define DEBUG_DHT GNUNET_NO
+#define DEBUG_DHT GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/block/plugin_block_dns.c b/src/block/plugin_block_dns.c
index e203706..22fae2c 100644
--- a/src/block/plugin_block_dns.c
+++ b/src/block/plugin_block_dns.c
@@ -29,7 +29,7 @@
 #include "block_dns.h"
 #include "gnunet_signatures.h"
 
-#define DEBUG_DHT GNUNET_NO
+#define DEBUG_DHT GNUNET_EXTRA_LOGGING
 
 /**
  * Function called to validate a reply or a request.  For
diff --git a/src/block/plugin_block_fs.c b/src/block/plugin_block_fs.c
index 28a5652..5a0e90a 100644
--- a/src/block/plugin_block_fs.c
+++ b/src/block/plugin_block_fs.c
@@ -29,7 +29,7 @@
 #include "block_fs.h"
 #include "gnunet_signatures.h"
 
-#define DEBUG_FS_BLOCK GNUNET_NO
+#define DEBUG_FS_BLOCK GNUNET_EXTRA_LOGGING
 
 /**
  * Number of bits we set per entry in the bloomfilter.
diff --git a/src/block/plugin_block_template.c b/src/block/plugin_block_template.c
index 7ce3004..6ed675d 100644
--- a/src/block/plugin_block_template.c
+++ b/src/block/plugin_block_template.c
@@ -27,7 +27,7 @@
 #include "platform.h"
 #include "gnunet_block_plugin.h"
 
-#define DEBUG_TEMPLATE GNUNET_NO
+#define DEBUG_TEMPLATE GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/block/plugin_block_test.c b/src/block/plugin_block_test.c
index 76853a1..0c769b8 100644
--- a/src/block/plugin_block_test.c
+++ b/src/block/plugin_block_test.c
@@ -28,7 +28,7 @@
 #include "platform.h"
 #include "gnunet_block_plugin.h"
 
-#define DEBUG_TEST GNUNET_NO
+#define DEBUG_TEST GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/block/test_block.c b/src/block/test_block.c
index f7a3422..d1d3edb 100644
--- a/src/block/test_block.c
+++ b/src/block/test_block.c
@@ -25,9 +25,9 @@
 #include "platform.h"
 #include "gnunet_block_lib.h"
 
-#define DEBUG GNUNET_NO
+#define DEBUG GNUNET_EXTRA_LOGGING
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static int
 test_fs (struct GNUNET_BLOCK_Context *ctx)
diff --git a/src/chat/chat.c b/src/chat/chat.c
index b51d29b..ae73b96 100644
--- a/src/chat/chat.c
+++ b/src/chat/chat.c
@@ -32,7 +32,7 @@
 #include "gnunet_signatures.h"
 #include "chat.h"
 
-#define DEBUG_CHAT GNUNET_NO
+#define DEBUG_CHAT GNUNET_EXTRA_LOGGING
 #define NICK_IDENTITY_PREFIX ".chat_identity_"
 
 
diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c
index c41ec90..ed8dfb9 100644
--- a/src/chat/gnunet-service-chat.c
+++ b/src/chat/gnunet-service-chat.c
@@ -33,7 +33,7 @@
 #include "gnunet_signatures.h"
 #include "chat.h"
 
-#define DEBUG_CHAT_SERVICE GNUNET_NO
+#define DEBUG_CHAT_SERVICE GNUNET_EXTRA_LOGGING
 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
 #define EXPECTED_NEIGHBOUR_COUNT 16
 #define QUEUE_SIZE 16
diff --git a/src/chat/test_chat.c b/src/chat/test_chat.c
index 7cf8b19..b4e14f0 100644
--- a/src/chat/test_chat.c
+++ b/src/chat/test_chat.c
@@ -37,7 +37,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_chat_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/chat/test_chat_private.c b/src/chat/test_chat_private.c
index acec5bc..0396897 100644
--- a/src/chat/test_chat_private.c
+++ b/src/chat/test_chat_private.c
@@ -30,7 +30,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_chat_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/core/core.h b/src/core/core.h
index 37580bb..17a4c8f 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -30,12 +30,12 @@
 /**
  * General core debugging.
  */
-#define DEBUG_CORE GNUNET_NO
+#define DEBUG_CORE GNUNET_EXTRA_LOGGING
 
 /**
  * Debugging interaction core-clients.
  */
-#define DEBUG_CORE_CLIENT GNUNET_NO
+#define DEBUG_CORE_CLIENT GNUNET_EXTRA_LOGGING
 
 /**
  * Definition of bits in the InitMessage's options field that specify
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 989c79f..0177415 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -44,9 +44,9 @@
 #include "core.h"
 
 
-#define DEBUG_HANDSHAKE GNUNET_NO
+#define DEBUG_HANDSHAKE GNUNET_EXTRA_LOGGING
 
-#define DEBUG_CORE_QUOTA GNUNET_NO
+#define DEBUG_CORE_QUOTA GNUNET_EXTRA_LOGGING
 
 /**
  * Receive and send buffer windows grow over time.  For
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index 894e4f6..1566840 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -34,7 +34,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/core/test_core_api_preferences.c b/src/core/test_core_api_preferences.c
index d336446..6730e37 100644
--- a/src/core/test_core_api_preferences.c
+++ b/src/core/test_core_api_preferences.c
@@ -31,7 +31,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index ad6e6a7..7224581 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -36,7 +36,7 @@
 #include "gnunet_transport_service.h"
 #include <gauger.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index ca301f5..ff4b564 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -31,7 +31,7 @@
 #include "gnunet_program_lib.h"
 #include "gnunet_scheduler_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define TIMEOUT 3
 
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index d955e0f..14c1afa 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -33,8 +33,8 @@
 #include "gnunet_transport_service.h"
 #include "gnunet_statistics_service.h"
 
-#define VERBOSE GNUNET_NO
-#define DEBUG_TRANSMISSION GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
+#define DEBUG_TRANSMISSION GNUNET_EXTRA_LOGGING
 
 #define SYMMETRIC 0
 #define ASYMMETRIC_SEND_LIMITED 1
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index fd3e23b..6fc0a72 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -27,7 +27,7 @@
 #include "gnunet_datacache_lib.h"
 #include <gauger.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define ASSERT(x) do { if (! (x)) { printf("Error at %s:%d\n", __FILE__, __LINE__); goto FAILURE;} } while (0)
 
diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c
index b9954fa..cf282db 100644
--- a/src/datacache/plugin_datacache_mysql.c
+++ b/src/datacache/plugin_datacache_mysql.c
@@ -82,7 +82,7 @@
 #include "gnunet_datacache_plugin.h"
 #include <mysql/mysql.h>
 
-#define DEBUG_DATACACHE_MYSQL GNUNET_NO
+#define DEBUG_DATACACHE_MYSQL GNUNET_EXTRA_LOGGING
 
 /**
  * Estimate of the per-entry overhead (including indices).
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 0f7dd89..e05fbf2 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -28,7 +28,7 @@
 #include "gnunet_datacache_plugin.h"
 #include <postgresql/libpq-fe.h>
 
-#define DEBUG_POSTGRES GNUNET_NO
+#define DEBUG_POSTGRES GNUNET_EXTRA_LOGGING
 
 /**
  * Per-entry overhead estimate
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c
index 2b36e5b..d7b77ac 100644
--- a/src/datacache/plugin_datacache_sqlite.c
+++ b/src/datacache/plugin_datacache_sqlite.c
@@ -28,7 +28,7 @@
 #include "gnunet_datacache_plugin.h"
 #include <sqlite3.h>
 
-#define DEBUG_DATACACHE_SQLITE GNUNET_NO
+#define DEBUG_DATACACHE_SQLITE GNUNET_EXTRA_LOGGING
 
 /**
  * How much overhead do we assume per entry in the
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index abf0209..6c70807 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -26,7 +26,7 @@
 #include "gnunet_util_lib.h"
 #include "gnunet_datacache_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define ASSERT(x) do { if (! (x)) { printf("Error at %s:%d\n", __FILE__, __LINE__); goto FAILURE;} } while (0)
 
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c
index 6a05e61..d3681da 100644
--- a/src/datacache/test_datacache_quota.c
+++ b/src/datacache/test_datacache_quota.c
@@ -26,7 +26,7 @@
 #include "gnunet_util_lib.h"
 #include "gnunet_datacache_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define ASSERT(x) do { if (! (x)) { printf("Error at %s:%d\n", __FILE__, __LINE__); goto FAILURE;} } while (0)
 
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h
index 1dcf7bb..fa8352d 100644
--- a/src/datastore/datastore.h
+++ b/src/datastore/datastore.h
@@ -27,7 +27,7 @@
 #ifndef DATASTORE_H
 #define DATASTORE_H
 
-#define DEBUG_DATASTORE GNUNET_NO
+#define DEBUG_DATASTORE GNUNET_EXTRA_LOGGING
 
 #include "gnunet_util_lib.h"
 
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 07df6a6..1ba2153 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -38,7 +38,7 @@
 #include "gnunet_datastore_service.h"
 #include <gauger.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * How long until we give up on transmitting the message?
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index ac3be4d..8f552c4 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -29,7 +29,7 @@
 #include "gnunet_datastore_plugin.h"
 #include <gauger.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * Target datastore size (in bytes).  Realistic sizes are
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index 0448b72..1048a37 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -121,7 +121,7 @@
 #include "gnunet_util_lib.h"
 #include <mysql/mysql.h>
 
-#define DEBUG_MYSQL GNUNET_NO
+#define DEBUG_MYSQL GNUNET_EXTRA_LOGGING
 
 #define MAX_DATUM_SIZE 65536
 
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 3c37325..0b78148 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -28,7 +28,7 @@
 #include "gnunet_datastore_plugin.h"
 #include <postgresql/libpq-fe.h>
 
-#define DEBUG_POSTGRES GNUNET_NO
+#define DEBUG_POSTGRES GNUNET_EXTRA_LOGGING
 
 /**
  * After how many ms "busy" should a DB operation fail for good?
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 9312027..318c22c 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -31,7 +31,7 @@
 /**
  * Enable or disable logging debug messages.
  */
-#define DEBUG_SQLITE GNUNET_NO
+#define DEBUG_SQLITE GNUNET_EXTRA_LOGGING
 
 /**
  * We allocate items on the stack at times.  To prevent a stack
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 47b1945..b1dd0e5 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -31,7 +31,7 @@
 #include "gnunet_protocols.h"
 #include "gnunet_datastore_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_DATASTORE GNUNET_YES
 
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index 72348e2..cb04d31 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -28,7 +28,7 @@
 #include "gnunet_protocols.h"
 #include "gnunet_datastore_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * How long until we give up on transmitting the message?
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index 373e8f4..3504945 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -28,7 +28,7 @@
 #include "gnunet_protocols.h"
 #include "gnunet_datastore_plugin.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * Number of put operations to perform.
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index 2e89cf3..100a945 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -34,7 +34,7 @@
 #include "gnunet_dht_service.h"
 #include "dht.h"
 
-#define DEBUG_DHT_API GNUNET_NO
+#define DEBUG_DHT_API GNUNET_EXTRA_LOGGING
 
 /**
  * Entry in our list of messages to be (re-)transmitted.
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c
index 87e08d8..51f7d94 100644
--- a/src/dht/test_dht_api.c
+++ b/src/dht/test_dht_api.c
@@ -34,9 +34,9 @@
 #include "gnunet_dht_service.h"
 #include "gnunet_hello_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index eb70424..d69ceed 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -28,7 +28,7 @@
 #include "gnunet_dht_service.h"
 
 /* DEFINES */
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /* Timeout for entire testcase */
 #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 30)
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c
index 9f13f51..8947739 100644
--- a/src/dht/test_dht_twopeer.c
+++ b/src/dht/test_dht_twopeer.c
@@ -28,7 +28,7 @@
 #include "gnunet_dht_service.h"
 
 /* DEFINES */
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define MAX_GET_ATTEMPTS 10
 
diff --git a/src/dht/test_dht_twopeer_get_put.c b/src/dht/test_dht_twopeer_get_put.c
index 86ce546..2a79c9f 100644
--- a/src/dht/test_dht_twopeer_get_put.c
+++ b/src/dht/test_dht_twopeer_get_put.c
@@ -44,7 +44,7 @@
 #include "gnunet_signatures.h"
 
 /* DEFINES */
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /* Timeout for entire testcase */
 #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 40)
diff --git a/src/dht/test_dht_twopeer_path_tracking.c b/src/dht/test_dht_twopeer_path_tracking.c
index 5be36c4..f2d86e3 100644
--- a/src/dht/test_dht_twopeer_path_tracking.c
+++ b/src/dht/test_dht_twopeer_path_tracking.c
@@ -28,7 +28,7 @@
 #include "gnunet_dht_service.h"
 
 /* DEFINES */
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /* Timeout for entire testcase */
 #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 5)
diff --git a/src/dht/test_dht_twopeer_put_get.c b/src/dht/test_dht_twopeer_put_get.c
index 197a050..44009c2 100644
--- a/src/dht/test_dht_twopeer_put_get.c
+++ b/src/dht/test_dht_twopeer_put_get.c
@@ -44,7 +44,7 @@
 #include "gnunet_signatures.h"
 
 /* DEFINES */
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /* Timeout for entire testcase */
 #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 5)
diff --git a/src/dv/dv.h b/src/dv/dv.h
index 1d4912f..5690cf6 100644
--- a/src/dv/dv.h
+++ b/src/dv/dv.h
@@ -28,13 +28,13 @@
 
 #include "gnunet_common.h"
 
-#define DEBUG_DV_GOSSIP GNUNET_NO
-#define DEBUG_DV_GOSSIP_SEND GNUNET_NO
-#define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO
-#define DEBUG_DV_MESSAGES GNUNET_NO
-#define DEBUG_DV GNUNET_NO
-#define DEBUG_DV_PEER_NUMBERS GNUNET_NO
-#define DEBUG_MESSAGE_DROP GNUNET_NO
+#define DEBUG_DV_GOSSIP GNUNET_EXTRA_LOGGING
+#define DEBUG_DV_GOSSIP_SEND GNUNET_EXTRA_LOGGING
+#define DEBUG_DV_GOSSIP_RECEIPT GNUNET_EXTRA_LOGGING
+#define DEBUG_DV_MESSAGES GNUNET_EXTRA_LOGGING
+#define DEBUG_DV GNUNET_EXTRA_LOGGING
+#define DEBUG_DV_PEER_NUMBERS GNUNET_EXTRA_LOGGING
+#define DEBUG_MESSAGE_DROP GNUNET_EXTRA_LOGGING
 
 typedef void (*GNUNET_DV_MessageReceivedHandler) (void *cls,
                                                   struct GNUNET_PeerIdentity *
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c
index bd73e7e..feb8a2e 100644
--- a/src/dv/plugin_transport_dv.c
+++ b/src/dv/plugin_transport_dv.c
@@ -37,7 +37,7 @@
 #include "gnunet_transport_plugin.h"
 #include "dv.h"
 
-#define DEBUG_TEMPLATE GNUNET_NO
+#define DEBUG_TEMPLATE GNUNET_EXTRA_LOGGING
 
 /**
  * Encapsulation of all of the state of the plugin.
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c
index 8303591..0e8444b 100644
--- a/src/dv/test_transport_api_dv.c
+++ b/src/dv/test_transport_api_dv.c
@@ -25,7 +25,7 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define TEST_ALL GNUNET_NO
 
diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c
index b04b283..14901cf 100644
--- a/src/fragmentation/test_fragmentation.c
+++ b/src/fragmentation/test_fragmentation.c
@@ -25,7 +25,7 @@
 #include "platform.h"
 #include "gnunet_fragmentation_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define DETAILS GNUNET_NO
 
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index ba44619..af889d8 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -31,7 +31,7 @@
 #include "fs.h"
 #include "fs_tree.h"
 
-#define DEBUG_DOWNLOAD GNUNET_NO
+#define DEBUG_DOWNLOAD GNUNET_EXTRA_LOGGING
 
 /**
  * Determine if the given download (options and meta data) should cause
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c
index 7475896..7b2d507 100644
--- a/src/fs/fs_namespace.c
+++ b/src/fs/fs_namespace.c
@@ -30,7 +30,7 @@
 #include "gnunet_fs_service.h"
 #include "fs.h"
 
-#define DEBUG_NAMESPACE GNUNET_NO
+#define DEBUG_NAMESPACE GNUNET_EXTRA_LOGGING
 
 /**
  * Return the name of the directory in which we store
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index b286d41..4f27aba 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -34,7 +34,7 @@
 #include "fs.h"
 #include "fs_tree.h"
 
-#define DEBUG_PUBLISH GNUNET_NO
+#define DEBUG_PUBLISH GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 10cce3f..93a7874 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -30,7 +30,7 @@
 #include "gnunet_protocols.h"
 #include "fs.h"
 
-#define DEBUG_SEARCH GNUNET_NO
+#define DEBUG_SEARCH GNUNET_EXTRA_LOGGING
 
 /**
  * Fill in all of the generic fields for a search event and
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index 60e80ef..fc04446 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -27,7 +27,7 @@
 #include "platform.h"
 #include "fs_tree.h"
 
-#define DEBUG_TREE GNUNET_NO
+#define DEBUG_TREE GNUNET_EXTRA_LOGGING
 
 /**
  * Context for an ECRS-based file encoder that computes
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index a37a39a..8dab620 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -31,7 +31,7 @@
 #include "fs.h"
 #include "fs_tree.h"
 
-#define DEBUG_UNINDEX GNUNET_NO
+#define DEBUG_UNINDEX GNUNET_EXTRA_LOGGING
 
 /**
  * Function called by the tree encoder to obtain
diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h
index ef2eebc..8ba90dd 100644
--- a/src/fs/gnunet-service-fs.h
+++ b/src/fs/gnunet-service-fs.h
@@ -35,7 +35,7 @@
 
 #define DEBUG_FS GNUNET_YES
 
-#define DEBUG_FS_CLIENT GNUNET_NO
+#define DEBUG_FS_CLIENT GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c
index acdba81..5154461 100644
--- a/src/fs/gnunet-service-fs_push.c
+++ b/src/fs/gnunet-service-fs_push.c
@@ -31,7 +31,7 @@
 #include "gnunet-service-fs_push.h"
 
 
-#define DEBUG_FS_MIGRATION GNUNET_NO
+#define DEBUG_FS_MIGRATION GNUNET_EXTRA_LOGGING
 
 /**
  * How long must content remain valid for us to consider it for migration?
diff --git a/src/fs/perf_gnunet_service_fs_p2p.c b/src/fs/perf_gnunet_service_fs_p2p.c
index 0bf05d0..bff884e 100644
--- a/src/fs/perf_gnunet_service_fs_p2p.c
+++ b/src/fs/perf_gnunet_service_fs_p2p.c
@@ -27,7 +27,7 @@
 #include "fs_test_lib.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * File-size we use for testing.
diff --git a/src/fs/perf_gnunet_service_fs_p2p_trust.c b/src/fs/perf_gnunet_service_fs_p2p_trust.c
index 64ddee6..9f5a36b 100644
--- a/src/fs/perf_gnunet_service_fs_p2p_trust.c
+++ b/src/fs/perf_gnunet_service_fs_p2p_trust.c
@@ -47,7 +47,7 @@
 #include "fs_test_lib.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * File-size we use for testing.
diff --git a/src/fs/test_fs.c b/src/fs/test_fs.c
index 9aee89e..6e9581d 100644
--- a/src/fs/test_fs.c
+++ b/src/fs/test_fs.c
@@ -28,7 +28,7 @@
 #include "gnunet_util.h"
 #include "gnunet_fsui_lib.h"
 
-#define DEBUG_VERBOSE GNUNET_NO
+#define DEBUG_VERBOSE GNUNET_EXTRA_LOGGING
 
 #define CHECK(a) if (!(a)) { ok = GNUNET_NO; GNUNET_GE_BREAK(NULL, 0); goto FAILURE; }
 
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c
index 10f4c0c..19ef6e7 100644
--- a/src/fs/test_fs_download.c
+++ b/src/fs/test_fs_download.c
@@ -30,7 +30,7 @@
 #include "gnunet_fs_service.h"
 #include <gauger.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_download_indexed.c b/src/fs/test_fs_download_indexed.c
index 1811b32..3f932f7 100644
--- a/src/fs/test_fs_download_indexed.c
+++ b/src/fs/test_fs_download_indexed.c
@@ -30,7 +30,7 @@
 #include "gnunet_fs_service.h"
 #include <gauger.h>
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c
index c26a609..9bc3723 100644
--- a/src/fs/test_fs_download_persistence.c
+++ b/src/fs/test_fs_download_persistence.c
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_download_recursive.c b/src/fs/test_fs_download_recursive.c
index d350dca..cede523 100644
--- a/src/fs/test_fs_download_recursive.c
+++ b/src/fs/test_fs_download_recursive.c
@@ -29,7 +29,7 @@
 #include "gnunet_util.h"
 #include "gnunet_fsui_lib.h"
 
-#define DEBUG_VERBOSE GNUNET_NO
+#define DEBUG_VERBOSE GNUNET_EXTRA_LOGGING
 
 #define CHECK(a) if (!(a)) { ok = GNUNET_NO; GNUNET_GE_BREAK(ectx, 0); goto FAILURE; }
 
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c
index db5a844..a459c56 100644
--- a/src/fs/test_fs_file_information.c
+++ b/src/fs/test_fs_file_information.c
@@ -36,7 +36,7 @@
 #include "gnunet_util_lib.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * File-size we use for testing.
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c
index b86506f..870f51a 100644
--- a/src/fs/test_fs_list_indexed.c
+++ b/src/fs/test_fs_list_indexed.c
@@ -33,7 +33,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index ae2f778..b1221eb 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -28,7 +28,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_namespace_list_updateable.c b/src/fs/test_fs_namespace_list_updateable.c
index 1ad2fb5..5f6ead3 100644
--- a/src/fs/test_fs_namespace_list_updateable.c
+++ b/src/fs/test_fs_namespace_list_updateable.c
@@ -28,7 +28,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c
index 3db0a7c..81ec3dd 100644
--- a/src/fs/test_fs_publish.c
+++ b/src/fs/test_fs_publish.c
@@ -30,7 +30,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c
index eab0aa6..145ef0c 100644
--- a/src/fs/test_fs_publish_persistence.c
+++ b/src/fs/test_fs_publish_persistence.c
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c
index d8e592b..9d9825e 100644
--- a/src/fs/test_fs_search.c
+++ b/src/fs/test_fs_search.c
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c
index 335b1be..74ba965 100644
--- a/src/fs/test_fs_search_persistence.c
+++ b/src/fs/test_fs_search_persistence.c
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_search_ranking.c b/src/fs/test_fs_search_ranking.c
index 53522c6..6da9363 100644
--- a/src/fs/test_fs_search_ranking.c
+++ b/src/fs/test_fs_search_ranking.c
@@ -28,7 +28,7 @@
 #include "gnunet_util.h"
 #include "gnunet_fsui_lib.h"
 
-#define CHECK_VERBOSE GNUNET_NO
+#define CHECK_VERBOSE GNUNET_EXTRA_LOGGING
 
 #define CHECK(a) if (!(a)) { ok = GNUNET_NO; GNUNET_GE_BREAK(NULL, 0); goto FAILURE; }
 
diff --git a/src/fs/test_fs_start_stop.c b/src/fs/test_fs_start_stop.c
index c65ad2f..23678fb 100644
--- a/src/fs/test_fs_start_stop.c
+++ b/src/fs/test_fs_start_stop.c
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_test_lib.c b/src/fs/test_fs_test_lib.c
index 589abb3..8f0bc1c 100644
--- a/src/fs/test_fs_test_lib.c
+++ b/src/fs/test_fs_test_lib.c
@@ -26,7 +26,7 @@
 #include "platform.h"
 #include "fs_test_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * File-size we use for testing.
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c
index 99913fb..9b21cd6 100644
--- a/src/fs/test_fs_unindex.c
+++ b/src/fs/test_fs_unindex.c
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c
index 69623ac..0529aac 100644
--- a/src/fs/test_fs_unindex_persistence.c
+++ b/src/fs/test_fs_unindex_persistence.c
@@ -28,7 +28,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c
index 3d6735c..5d8aa21 100644
--- a/src/fs/test_gnunet_service_fs_migration.c
+++ b/src/fs/test_gnunet_service_fs_migration.c
@@ -27,7 +27,7 @@
 #include "fs_test_lib.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * File-size we use for testing.
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c
index 17b7ec1..434dd3c 100644
--- a/src/fs/test_gnunet_service_fs_p2p.c
+++ b/src/fs/test_gnunet_service_fs_p2p.c
@@ -26,7 +26,7 @@
 #include "platform.h"
 #include "fs_test_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * File-size we use for testing.
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c
index c9bf967..b6cdfcf 100644
--- a/src/hello/test_hello.c
+++ b/src/hello/test_hello.c
@@ -25,9 +25,9 @@
 #include "platform.h"
 #include "gnunet_hello_lib.h"
 
-#define DEBUG GNUNET_NO
+#define DEBUG GNUNET_EXTRA_LOGGING
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 
 static size_t
diff --git a/src/hostlist/gnunet-daemon-hostlist.h b/src/hostlist/gnunet-daemon-hostlist.h
index 9612473..8c9824e 100644
--- a/src/hostlist/gnunet-daemon-hostlist.h
+++ b/src/hostlist/gnunet-daemon-hostlist.h
@@ -39,7 +39,7 @@
 /**
  * General hostlist daemon debugging.
  */
-#define DEBUG_HOSTLIST GNUNET_NO
+#define DEBUG_HOSTLIST GNUNET_EXTRA_LOGGING
 
 #define MAX_URL_LEN 1000
 #define MAX_BYTES_PER_HOSTLISTS 500000
diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c
index 85c6911..3343b7a 100644
--- a/src/hostlist/hostlist-client.c
+++ b/src/hostlist/hostlist-client.c
@@ -36,7 +36,7 @@
 #include "gnunet_common.h"
 #include "gnunet_bio_lib.h"
 
-#define DEBUG_HOSTLIST_CLIENT GNUNET_NO
+#define DEBUG_HOSTLIST_CLIENT GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c
index bfe0b4b..633824c 100644
--- a/src/hostlist/hostlist-server.c
+++ b/src/hostlist/hostlist-server.c
@@ -32,7 +32,7 @@
 #include "gnunet-daemon-hostlist.h"
 #include "gnunet_resolver_service.h"
 
-#define DEBUG_HOSTLIST_SERVER GNUNET_NO
+#define DEBUG_HOSTLIST_SERVER GNUNET_EXTRA_LOGGING
 
 /**
  * Handle to the HTTP server as provided by libmicrohttpd for IPv6.
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index b6d0a17..09410e1 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -27,7 +27,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
index 2538e42..b68a93a 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
@@ -30,7 +30,7 @@
 #include "gnunet_resolver_service.h"
 #include "gnunet_statistics_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
index 7280d85..ae5c1b6 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
@@ -28,7 +28,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/nat/nat.h b/src/nat/nat.h
index dbb5263..a32fe09 100644
--- a/src/nat/nat.h
+++ b/src/nat/nat.h
@@ -28,7 +28,7 @@
 #define NAT_H
 #include "gnunet_util_lib.h"
 
-#define DEBUG_NAT GNUNET_NO
+#define DEBUG_NAT GNUNET_EXTRA_LOGGING
 
 /**
  * Request to test NAT traversal.
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index 784fc6c..19631af 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -41,7 +41,7 @@
 #include "gnunet_nat_lib.h"
 
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c
index 2c6da3b..d4027ff 100644
--- a/src/nat/test_nat_mini.c
+++ b/src/nat/test_nat_mini.c
@@ -36,7 +36,7 @@
 #include "gnunet_nat_lib.h"
 
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /* Time to wait before stopping NAT, in seconds */
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index b3fb642..0786bb0 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -31,7 +31,7 @@
 #include "gnunet_nat_lib.h"
 
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 
 /**
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index 9342480..a18a13f 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -29,7 +29,7 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_nse_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 struct NSEPeer
 {
diff --git a/src/nse/nse.h b/src/nse/nse.h
index 38cafaf..5368345 100644
--- a/src/nse/nse.h
+++ b/src/nse/nse.h
@@ -33,7 +33,7 @@
 /**
  * Generate debug-level log messages?
  */
-#define DEBUG_NSE GNUNET_NO
+#define DEBUG_NSE GNUNET_EXTRA_LOGGING
 
 /**
  * Network size estimate sent from the service
diff --git a/src/nse/test_nse_multipeer.c b/src/nse/test_nse_multipeer.c
index 1db0041..4b4dbe7 100644
--- a/src/nse/test_nse_multipeer.c
+++ b/src/nse/test_nse_multipeer.c
@@ -29,7 +29,7 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_nse_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define NUM_PEERS 4
 
diff --git a/src/peerinfo/peerinfo.h b/src/peerinfo/peerinfo.h
index 8786009..992dde7 100644
--- a/src/peerinfo/peerinfo.h
+++ b/src/peerinfo/peerinfo.h
@@ -27,7 +27,7 @@
 #include "gnunet_time_lib.h"
 #include "gnunet_peerinfo_service.h"
 
-#define DEBUG_PEERINFO GNUNET_NO
+#define DEBUG_PEERINFO GNUNET_EXTRA_LOGGING
 
 /**
  * Message requesting a listing of all known peers,
diff --git a/src/statistics/statistics.h b/src/statistics/statistics.h
index 14dd45d..a65dff1 100644
--- a/src/statistics/statistics.h
+++ b/src/statistics/statistics.h
@@ -27,7 +27,7 @@
 
 #include "gnunet_common.h"
 
-#define DEBUG_STATISTICS GNUNET_NO
+#define DEBUG_STATISTICS GNUNET_EXTRA_LOGGING
 
 /**
  * Statistics message. Contains how long the system is up
diff --git a/src/statistics/test_statistics_api.c b/src/statistics/test_statistics_api.c
index 39a71a7..efaf2d2 100644
--- a/src/statistics/test_statistics_api.c
+++ b/src/statistics/test_statistics_api.c
@@ -29,7 +29,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_statistics_service.h"
 
-#define DEBUG_STATISTICS GNUNET_NO
+#define DEBUG_STATISTICS GNUNET_EXTRA_LOGGING
 
 #define START_SERVICE GNUNET_YES
 
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c
index eb739b7..f468c4e 100644
--- a/src/statistics/test_statistics_api_loop.c
+++ b/src/statistics/test_statistics_api_loop.c
@@ -29,7 +29,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_statistics_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_SERVICE GNUNET_YES
 
diff --git a/src/statistics/test_statistics_api_watch.c b/src/statistics/test_statistics_api_watch.c
index cea4958..14e7e17 100644
--- a/src/statistics/test_statistics_api_watch.c
+++ b/src/statistics/test_statistics_api_watch.c
@@ -29,7 +29,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_statistics_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define START_SERVICE GNUNET_YES
 
diff --git a/src/template/test_template_api.c b/src/template/test_template_api.c
index b987851..9302d07 100644
--- a/src/template/test_template_api.c
+++ b/src/template/test_template_api.c
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_common.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static int
 check ()
diff --git a/src/testing/test_testing_connect.c b/src/testing/test_testing_connect.c
index a31449a..5ace31f 100644
--- a/src/testing/test_testing_connect.c
+++ b/src/testing/test_testing_connect.c
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * How long until we give up on connecting the peers?
diff --git a/src/testing/test_testing_group.c b/src/testing/test_testing_group.c
index f5df45b..0ed01cb 100644
--- a/src/testing/test_testing_group.c
+++ b/src/testing/test_testing_group.c
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define NUM_PEERS 4
 
diff --git a/src/testing/test_testing_peergroup.c b/src/testing/test_testing_peergroup.c
index 061a0ca..8b8d329 100644
--- a/src/testing/test_testing_peergroup.c
+++ b/src/testing/test_testing_peergroup.c
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define NUM_PEERS 4
 
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index 27ad0a2..152b5cd 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -26,7 +26,7 @@
 #include "gnunet_core_service.h"
 #include "gnunet_os_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PROGRESS_BARS GNUNET_YES
 
diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c
index d60e3a8..046cb2c 100644
--- a/src/testing/test_testing_topology_blacklist.c
+++ b/src/testing/test_testing_topology_blacklist.c
@@ -25,7 +25,7 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * How long until we fail the whole testcase?
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 335457d..2e1dceb 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -37,9 +37,9 @@
 #include "gnunet_transport_service.h"
 #include "gnunet_hello_lib.h"
 
-#define DEBUG_TESTING GNUNET_NO
+#define DEBUG_TESTING GNUNET_EXTRA_LOGGING
 
-#define DEBUG_TESTING_RECONNECT GNUNET_NO
+#define DEBUG_TESTING_RECONNECT GNUNET_EXTRA_LOGGING
 
 /**
  * Hack to deal with initial HELLO's being often devoid of addresses.
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index 0813bd4..f4d789c 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -30,11 +30,11 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
 
-#define VERBOSE_TESTING GNUNET_NO
+#define VERBOSE_TESTING GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_TOPOLOGY GNUNET_NO
+#define VERBOSE_TOPOLOGY GNUNET_EXTRA_LOGGING
 
-#define DEBUG_CHURN GNUNET_NO
+#define DEBUG_CHURN GNUNET_EXTRA_LOGGING
 
 #define USE_START_HELPER GNUNET_YES
 
diff --git a/src/topology/test_gnunet_daemon_topology.c b/src/topology/test_gnunet_daemon_topology.c
index 4999078..9d8f163 100644
--- a/src/topology/test_gnunet_daemon_topology.c
+++ b/src/topology/test_gnunet_daemon_topology.c
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define NUM_PEERS 2
 
diff --git a/src/transport/gnunet-transport-connect-running-peers.c b/src/transport/gnunet-transport-connect-running-peers.c
index aac63cb..3542f85 100644
--- a/src/transport/gnunet-transport-connect-running-peers.c
+++ b/src/transport/gnunet-transport-connect-running-peers.c
@@ -36,9 +36,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h
index 1158455..9b057d1 100644
--- a/src/transport/plugin_transport_http.h
+++ b/src/transport/plugin_transport_http.h
@@ -45,7 +45,7 @@
 #define DEBUG_HTTP GNUNET_YES
 #define VERBOSE_SERVER GNUNET_YES
 #define VERBOSE_CLIENT GNUNET_YES
-#define VERBOSE_CURL GNUNET_NO
+#define VERBOSE_CURL GNUNET_EXTRA_LOGGING
 
 #if BUILD_HTTPS
 #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_https_init
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c
index 2600456..fa11a9b 100644
--- a/src/transport/plugin_transport_smtp.c
+++ b/src/transport/plugin_transport_smtp.c
@@ -40,7 +40,7 @@
  */
 #define SMTP_MESSAGE_SIZE 65528
 
-#define DEBUG_SMTP GNUNET_NO
+#define DEBUG_SMTP GNUNET_EXTRA_LOGGING
 
 #define FILTER_STRING_SIZE 64
 
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index af253f9..20e4bda 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -39,9 +39,9 @@
 #include "gnunet_transport_plugin.h"
 #include "transport.h"
 
-#define DEBUG_TCP GNUNET_NO
+#define DEBUG_TCP GNUNET_EXTRA_LOGGING
 
-#define DEBUG_TCP_NAT GNUNET_NO
+#define DEBUG_TCP_NAT GNUNET_EXTRA_LOGGING
 
 /**
  * Initial handshake message for a session.
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index 3ad8014..7110f9c 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -33,7 +33,7 @@
 #include "gnunet_transport_service.h"
 #include "gnunet_transport_plugin.h"
 
-#define DEBUG_TEMPLATE GNUNET_NO
+#define DEBUG_TEMPLATE GNUNET_EXTRA_LOGGING
 
 /**
  * After how long do we expire an address that we
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 752dd6f..a63c7d3 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -38,7 +38,7 @@
 #include "gnunet_transport_plugin.h"
 #include "transport.h"
 
-#define DEBUG_UDP GNUNET_NO
+#define DEBUG_UDP GNUNET_EXTRA_LOGGING
 
 /**
  * MTU for fragmentation subsystem.  Should be conservative since
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 59c42e1..b927214 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -42,7 +42,7 @@
 #include "gnunet_transport_plugin.h"
 #include "transport.h"
 
-#define DEBUG_UNIX GNUNET_NO
+#define DEBUG_UNIX GNUNET_EXTRA_LOGGING
 #define DETAILS GNUNET_NO
 
 #define MAX_PROBES 20
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 81f7923..2bd2dc9 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -101,9 +101,9 @@
  * DEBUG switch
  */
 #define DEBUG_wlan GNUNET_YES
-#define DEBUG_wlan_retransmission GNUNET_NO
-#define DEBUG_wlan_ip_udp_packets_on_air GNUNET_NO
-#define DEBUG_wlan_msg_dump GNUNET_NO
+#define DEBUG_wlan_retransmission GNUNET_EXTRA_LOGGING
+#define DEBUG_wlan_ip_udp_packets_on_air GNUNET_EXTRA_LOGGING
+#define DEBUG_wlan_msg_dump GNUNET_EXTRA_LOGGING
 
 
 #define IEEE80211_ADDR_LEN      6       /* size of 802.11 address */
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 794c831..56abe2c 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -37,7 +37,7 @@
 #include "gnunet_transport_plugin.h"
 #include "transport.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * How long until we give up on transmitting the message?
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c
index 778fe4b..aab66c2 100644
--- a/src/transport/test_plugin_transport_http.c
+++ b/src/transport/test_plugin_transport_http.c
@@ -42,8 +42,8 @@
 #include "transport.h"
 #include <curl/curl.h>
 
-#define VERBOSE GNUNET_NO
-#define DEBUG_CURL GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
+#define DEBUG_CURL GNUNET_EXTRA_LOGGING
 #define HTTP_BUFFER_SIZE 2048
 
 #define PROTOCOL_PREFIX "http"
diff --git a/src/transport/test_plugin_transport_https.c b/src/transport/test_plugin_transport_https.c
index 962010c..1027c2b 100644
--- a/src/transport/test_plugin_transport_https.c
+++ b/src/transport/test_plugin_transport_https.c
@@ -42,8 +42,8 @@
 #include "transport.h"
 #include <curl/curl.h>
 
-#define VERBOSE GNUNET_NO
-#define DEBUG_CURL GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
+#define DEBUG_CURL GNUNET_EXTRA_LOGGING
 #define HTTP_BUFFER_SIZE 2048
 
 #define PLUGIN libgnunet_plugin_transport_template
diff --git a/src/transport/test_plugin_transport_udp.c b/src/transport/test_plugin_transport_udp.c
index 8fbd2ab..1b0ec91 100644
--- a/src/transport/test_plugin_transport_udp.c
+++ b/src/transport/test_plugin_transport_udp.c
@@ -38,7 +38,7 @@
 #include "gnunet_transport_plugin.h"
 #include "transport.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * How long until we give up on transmitting the message?
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 63bd7da..8e4a40e 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -35,13 +35,13 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
-#define DEBUG_MEASUREMENT GNUNET_NO
-#define DEBUG_CONNECTIONS GNUNET_NO
+#define DEBUG_MEASUREMENT GNUNET_EXTRA_LOGGING
+#define DEBUG_CONNECTIONS GNUNET_EXTRA_LOGGING
 
 #define MEASUREMENT_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
 #define MEASUREMENT_MSG_SIZE 1024
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index eb64b0f..033577a 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -37,9 +37,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index 3cc30d9..ad169df 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -37,9 +37,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index bc8b825..6681667 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -37,9 +37,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index d53ac0d..a64a6fb 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -40,7 +40,7 @@
 
 #define VERBOSE GNUNET_YES
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c
index 0124889..84a8316 100644
--- a/src/transport/test_transport_api_timeout.c
+++ b/src/transport/test_transport_api_timeout.c
@@ -38,9 +38,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 6300115..a8c8d14 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -39,9 +39,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index 4bbacca..d7c70df 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -39,9 +39,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c
index 075c105..89ada4c 100644
--- a/src/transport/test_transport_startonly.c
+++ b/src/transport/test_transport_startonly.c
@@ -37,9 +37,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c
index 85c05df..db9f528 100644
--- a/src/transport/test_transport_testing.c
+++ b/src/transport/test_transport_testing.c
@@ -37,9 +37,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
-#define VERBOSE_ARM GNUNET_NO
+#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
 #define START_ARM GNUNET_YES
 
diff --git a/src/transport/transport.h b/src/transport/transport.h
index 505d106..6ccc8ab 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -30,13 +30,13 @@
 #include "gnunet_time_lib.h"
 #include "gnunet_transport_service.h"
 
-#define DEBUG_TRANSPORT GNUNET_NO
+#define DEBUG_TRANSPORT GNUNET_EXTRA_LOGGING
 
-#define DEBUG_TRANSPORT_TIMEOUT GNUNET_NO
+#define DEBUG_TRANSPORT_TIMEOUT GNUNET_EXTRA_LOGGING
 
-#define DEBUG_TRANSPORT_DISCONNECT GNUNET_NO
+#define DEBUG_TRANSPORT_DISCONNECT GNUNET_EXTRA_LOGGING
 
-#define DEBUG_TRANSPORT_API GNUNET_NO
+#define DEBUG_TRANSPORT_API GNUNET_EXTRA_LOGGING
 
 /**
  * For how long do we allow unused bandwidth
diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c
index 8d81e55..c0ac540 100644
--- a/src/util/bandwidth.c
+++ b/src/util/bandwidth.c
@@ -27,7 +27,7 @@
 #include "gnunet_bandwidth_lib.h"
 #include "gnunet_server_lib.h"
 
-#define DEBUG_BANDWIDTH GNUNET_NO
+#define DEBUG_BANDWIDTH GNUNET_EXTRA_LOGGING
 
 /**
  * Create a new bandwidth value.
diff --git a/src/util/client.c b/src/util/client.c
index f769370..dbca856 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -34,7 +34,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_scheduler_lib.h"
 
-#define DEBUG_CLIENT GNUNET_NO
+#define DEBUG_CLIENT GNUNET_EXTRA_LOGGING
 
 /**
  * How often do we re-try tranmsitting requests before giving up?
diff --git a/src/util/connection.c b/src/util/connection.c
index bb5df7f..6b2cf75 100644
--- a/src/util/connection.c
+++ b/src/util/connection.c
@@ -39,7 +39,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_server_lib.h"
 
-#define DEBUG_CONNECTION GNUNET_NO
+#define DEBUG_CONNECTION GNUNET_EXTRA_LOGGING
 
 /**
  * Possible functions to call after connect failed or succeeded.
diff --git a/src/util/disk.c b/src/util/disk.c
index 9059852..bb507bb 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -34,9 +34,9 @@
 #include "gnunet_crypto_lib.h"
 #include "disk.h"
 
-#define DEBUG_NPIPE GNUNET_NO
+#define DEBUG_NPIPE GNUNET_EXTRA_LOGGING
 
-#define DEBUG_PIPE GNUNET_NO
+#define DEBUG_PIPE GNUNET_EXTRA_LOGGING
 
 /**
  * Block size for IO for copying files.
diff --git a/src/util/load.c b/src/util/load.c
index 35ed443..39e8615 100644
--- a/src/util/load.c
+++ b/src/util/load.c
@@ -26,7 +26,7 @@
 #include "platform.h"
 #include "gnunet_load_lib.h"
 
-#define DEBUG_LOAD GNUNET_NO
+#define DEBUG_LOAD GNUNET_EXTRA_LOGGING
 
 /**
  * Values we track for load calculations.
diff --git a/src/util/network.c b/src/util/network.c
index 27744bc..320304f 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -29,9 +29,9 @@
 #include "disk.h"
 #include "gnunet_container_lib.h"
 
-#define DEBUG_NETWORK GNUNET_NO
+#define DEBUG_NETWORK GNUNET_EXTRA_LOGGING
 
-#define DEBUG_W32_CYCLES GNUNET_NO
+#define DEBUG_W32_CYCLES GNUNET_EXTRA_LOGGING
 
 #ifndef INVALID_SOCKET
 #define INVALID_SOCKET -1
diff --git a/src/util/resolver.h b/src/util/resolver.h
index 5adf436..57cb686 100644
--- a/src/util/resolver.h
+++ b/src/util/resolver.h
@@ -27,7 +27,7 @@
 
 #include "gnunet_common.h"
 
-#define DEBUG_RESOLVER GNUNET_NO
+#define DEBUG_RESOLVER GNUNET_EXTRA_LOGGING
 
 /**
  * Request for the resolver.  Followed by either
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index e2f6700..dad924c 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -48,7 +48,7 @@
 /**
  * Check each file descriptor before adding
  */
-#define DEBUG_FDS GNUNET_NO
+#define DEBUG_FDS GNUNET_EXTRA_LOGGING
 
 /**
  * Depth of the traces collected via EXECINFO.
@@ -56,7 +56,7 @@
 #define MAX_TRACE_DEPTH 50
 #endif
 
-#define DEBUG_TASKS GNUNET_NO
+#define DEBUG_TASKS GNUNET_EXTRA_LOGGING
 
 /**
  * Should we figure out which tasks are delayed for a while
diff --git a/src/util/server.c b/src/util/server.c
index c8eb15f..63993ee 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -33,7 +33,7 @@
 #include "gnunet_disk_lib.h"
 #include "gnunet_protocols.h"
 
-#define DEBUG_SERVER GNUNET_NO
+#define DEBUG_SERVER GNUNET_EXTRA_LOGGING
 
 /**
  * List of arrays of message handlers.
diff --git a/src/util/server_mst.c b/src/util/server_mst.c
index ad3be8f..adb0a08 100644
--- a/src/util/server_mst.c
+++ b/src/util/server_mst.c
@@ -31,7 +31,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define DEBUG_SERVER_MST GNUNET_NO
+#define DEBUG_SERVER_MST GNUNET_EXTRA_LOGGING
 
 #if HAVE_UNALIGNED_64_ACCESS
 #define ALIGN_FACTOR 4
diff --git a/src/util/server_nc.c b/src/util/server_nc.c
index 7a26ab9..dc7a27c 100644
--- a/src/util/server_nc.c
+++ b/src/util/server_nc.c
@@ -34,7 +34,7 @@
 #include "gnunet_time_lib.h"
 
 
-#define DEBUG_SERVER_NC GNUNET_NO
+#define DEBUG_SERVER_NC GNUNET_EXTRA_LOGGING
 
 /**
  * Entry in list of messages pending to be transmitted.
diff --git a/src/util/service.c b/src/util/service.c
index ad74d27..15937e1 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -36,7 +36,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_service_lib.h"
 
-#define DEBUG_SERVICE GNUNET_NO
+#define DEBUG_SERVICE GNUNET_EXTRA_LOGGING
 
 /* ******************* access control ******************** */
 
diff --git a/src/util/test_client.c b/src/util/test_client.c
index f9d961a..bb7d500 100644
--- a/src/util/test_client.c
+++ b/src/util/test_client.c
@@ -29,7 +29,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 14325
 
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c
index 2737cb4..f02705f 100644
--- a/src/util/test_configuration.c
+++ b/src/util/test_configuration.c
@@ -28,7 +28,7 @@
 #include "gnunet_configuration_lib.h"
 #include "gnunet_disk_lib.h"
 
-#define DEBUG GNUNET_NO
+#define DEBUG GNUNET_EXTRA_LOGGING
 
 /* Test Configuration Diffs Options */
 enum
diff --git a/src/util/test_connection.c b/src/util/test_connection.c
index cb69f40..92c0cea 100644
--- a/src/util/test_connection.c
+++ b/src/util/test_connection.c
@@ -27,7 +27,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_connection_addressing.c b/src/util/test_connection_addressing.c
index 2d08acc..018cf61 100644
--- a/src/util/test_connection_addressing.c
+++ b/src/util/test_connection_addressing.c
@@ -27,7 +27,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_connection_receive_cancel.c b/src/util/test_connection_receive_cancel.c
index aa16724..6382934 100644
--- a/src/util/test_connection_receive_cancel.c
+++ b/src/util/test_connection_receive_cancel.c
@@ -27,7 +27,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_connection_timeout.c b/src/util/test_connection_timeout.c
index 2338665..1700718 100644
--- a/src/util/test_connection_timeout.c
+++ b/src/util/test_connection_timeout.c
@@ -27,7 +27,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_connection_timeout_no_connect.c b/src/util/test_connection_timeout_no_connect.c
index 2e8f9be..b598907 100644
--- a/src/util/test_connection_timeout_no_connect.c
+++ b/src/util/test_connection_timeout_no_connect.c
@@ -27,7 +27,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 13425
 
diff --git a/src/util/test_connection_transmit_cancel.c b/src/util/test_connection_transmit_cancel.c
index d81c32a..50308a2 100644
--- a/src/util/test_connection_transmit_cancel.c
+++ b/src/util/test_connection_transmit_cancel.c
@@ -27,7 +27,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c
index 36dd42a..df85205 100644
--- a/src/util/test_os_start_process.c
+++ b/src/util/test_os_start_process.c
@@ -33,7 +33,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "disk.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static char *test_phrase = "HELLO WORLD";
 static int ok;
diff --git a/src/util/test_peer.c b/src/util/test_peer.c
index 1729114..3817d82 100644
--- a/src/util/test_peer.c
+++ b/src/util/test_peer.c
@@ -29,7 +29,7 @@
 
 #define NUMBER_OF_PEERS 10
 
-#define DEBUG GNUNET_NO
+#define DEBUG GNUNET_EXTRA_LOGGING
 
 /**
  * A list of Peer ID's to play with
diff --git a/src/util/test_plugin.c b/src/util/test_plugin.c
index 9f1f0aa..479edb3 100644
--- a/src/util/test_plugin.c
+++ b/src/util/test_plugin.c
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_plugin_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static int
 check ()
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c
index 704dc47..4e248aa 100644
--- a/src/util/test_resolver_api.c
+++ b/src/util/test_resolver_api.c
@@ -30,7 +30,7 @@
 #include "gnunet_resolver_service.h"
 #include "resolver.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 /**
  * Using DNS root servers to check gnunet's resolver service
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c
index 3d8ae97..788ba13 100644
--- a/src/util/test_scheduler.c
+++ b/src/util/test_scheduler.c
@@ -27,7 +27,7 @@
 #include "gnunet_time_lib.h"
 #include "gnunet_disk_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static void
 task3 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
diff --git a/src/util/test_scheduler_delay.c b/src/util/test_scheduler_delay.c
index 8bcfa09..ff6966a 100644
--- a/src/util/test_scheduler_delay.c
+++ b/src/util/test_scheduler_delay.c
@@ -28,7 +28,7 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static struct GNUNET_TIME_Absolute target;
 
diff --git a/src/util/test_server.c b/src/util/test_server.c
index 59bf8a2..6c79e60 100644
--- a/src/util/test_server.c
+++ b/src/util/test_server.c
@@ -28,7 +28,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_server_disconnect.c b/src/util/test_server_disconnect.c
index 8010695..69207f8 100644
--- a/src/util/test_server_disconnect.c
+++ b/src/util/test_server_disconnect.c
@@ -28,7 +28,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_server_with_client.c b/src/util/test_server_with_client.c
index 06a4b71..5b6e517 100644
--- a/src/util/test_server_with_client.c
+++ b/src/util/test_server_with_client.c
@@ -30,7 +30,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 22335
 
diff --git a/src/util/test_server_with_client_unix.c b/src/util/test_server_with_client_unix.c
index 99af4e8..4f80f18 100644
--- a/src/util/test_server_with_client_unix.c
+++ b/src/util/test_server_with_client_unix.c
@@ -30,7 +30,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define MY_TYPE 128
 
diff --git a/src/util/test_service.c b/src/util/test_service.c
index edfe337..1b78932 100644
--- a/src/util/test_service.c
+++ b/src/util/test_service.c
@@ -31,7 +31,7 @@
 #include "gnunet_time_lib.h"
 
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define PORT 12435
 
diff --git a/src/util/test_strings.c b/src/util/test_strings.c
index 97b0f41..c6d6041 100644
--- a/src/util/test_strings.c
+++ b/src/util/test_strings.c
@@ -25,7 +25,7 @@
 #include "gnunet_common.h"
 #include "gnunet_strings_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 #define WANT(a,b) if (0 != strcmp(a,b)) { fprintf(stderr, "Got `%s', wanted `%s'\n", b, a); GNUNET_free(b); GNUNET_break(0); return 1;} else { GNUNET_free (b); }
 #define WANTB(a,b,l) if (0 != memcmp(a,b,l)) { GNUNET_break(0); return 1;} else { }
diff --git a/src/util/test_time.c b/src/util/test_time.c
index 788884f..c5232ff 100644
--- a/src/util/test_time.c
+++ b/src/util/test_time.c
@@ -25,7 +25,7 @@
 #include "gnunet_common.h"
 #include "gnunet_time_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static int
 check ()
-- 
1.7.4

Activities

Christian Grothoff

2011-09-29 23:43

manager   ~0004654

Problems with this patch:

1) global variables exported from a library via header (not supported on some platforms, I hear W32 is particularly bad here)

2) not convinced that the GN_LIKELY/UNLIKELY crap does anything significant for performance here

3) you'll still evaluate the arguments if ANY component enables a high debug level for ALL components, even if they have a low debug level; so this would certainly still NOT permit removing the #defines for COMPONENT_DEBUG statments from a performance point-of-view

4) get_component_log_levels is also rather expensive, especially since a full re-evaluation is done each time; caching of results might help some

5) 'process_definition' should be static

6) instead of using additional subcomponents (as suggested in your comment), the filename (easily obtained using __FILE__ in the #define) or even function name (__FUNCTION__) might be useful (and obtainable without extra work) as a way to further configure logging details; still, the impact on the binary size should be controlled (configure option "--disable-log-details" or something like that to change the logging macros?).

7) This definitively needs a testcase...

But this is certainly food for thought, just not quite ready IMO.

LRN

2011-09-30 02:03

developer   ~0004655

1) Works on W32 (i compiled and tested that on W32!). Also, glib does this, for example in ( http://developer.gnome.org/glib/2.29/glib-Version-Information.html ). If it works for them, it should work for GNUnet.

2) I can't make good large-scale tests right now (for obvious reasons). But it should be easy to check once i get my hardware back: run a complex testcase with loglevel ERROR a few times, then recompile with empty likely/unlikely definitions and compare. Then do the same for DEBUG loglevel (to measure the performance impact of consistent branch mis-prediction).

3) i'm not asking you to remove current DEBUG_FOO and VERBOSE macros. In fact, they provide a good (no, scratch that; it's not good, but it works) way to make release builds with disabled debug logging.

As for ANY and ALL - yeah, you're right. I need to come up with real per-category loglevels, which should be available separately at runtime. Gstreamer has them, by the way, but does not use them to prevent argument evaluation (i.e. they are used AFTER the message is formatted); not sure why, but i could ask gst devs about that.
runtime per-component loglevels mean 2 things:
A) have to make a variable that contains the loglevel for the component. That is, instead of LOG_FROM (...,"tcp",...) it would be something like LOG_FROM (...,tcp,...), where tcp is a pointer to a struct with a string "tcp" and a loglevel for it; macro can then check this loglevel instead of the global one. The variable should be able to span multiple source files (unless you want to restrict category to one .c file, which might or might not be a good idea), which means that it will be declared extern in internal headers; will probably need some more magic to prevent it from being exported from dlls (is it really necessary? apart from being clean?).
B) have to initialize that variable somewhere. Heap or stack allocation? Probably stack. Especially if you go the "one category can only cover as much as one source file" way.
That also requires gnunet to use LOG_FROM () much more often, but it's in TODO anyway.
log_setup() does not need to know about it, i think (which separates generic/global logging setup from per-component setup, which consists of allocating and defining that struct). And logger functions will keep getting only the string from that struct, not the struct itself

4) it's only used in log_setup (). But caching it is doable...i think...

5) obviously fixable

6) well, you could say that subcomponent==sourcefile; not necessarily good for the one who debugs (lots of source files -> lots of subcomponents -> lots of typing to define the right env vars, if you want to cover the whole component), but it certainly works. subcomponent==function suffers from the same problem (although it does allow for VERY narrow logging definitions; there were moments when i wanted exactly that). I guess i'll just need to write code and see how it works.
--disable-log-details can be made by removing GNUNET_YES/GNUNET_NO from the DEBUG_FOO and/or VERBOSE, using global definitions (from config.h) GNUNET_LOG_DETAILS_DEBUG and GNUNET_LOG_DETAILS_VERBOSE (or something like that) instead of them. This way you can disable/enable all logging at compile time with a flip of one switch (well, two switches). I proposed that in the IRC at some point, but it didn't seem attractive, not without the ability to narrow the logging, which is what this patch is going to introduce. Right now i'm using a Python script to automatically change these definitions across the whole source tree (the script is kinda silly though, so i won't show it to you).

7) H-m-m-m... Make a small test executable with disabled logging, run it, and fail if it's not sufficiently fast (it should have some expensive computations (or just sleep calls) skipped by the loglevel check, to make this detectable). Yeah, that's doable.

[quote]But this is certainly food for thought, just not quite ready IMO.[/quote]
Which is why it's on the mantis, not in your inbox.

Christian Grothoff

2011-10-03 16:57

manager   ~0004676

A few more comments:

1) "get_log_call_status" violates naming conventions (should be GNUNET_log_get_call_status" as it is a symbol exported from libgnunetutil for logging).

2) Given that your measurements agree with my gut, I don't know why you kept the GN_UNLIKELY stuff. (Naturally, I rely a bit here on your interpretation of 'measurement error' as I don't know what your benchmark and/or setup was precisely -- but 1s out of 10s (10s longer than no-logging at all) is not terribly much (given that we hardly assume that GNUnet will spent most of its runtime doing logging).

3) Your source-comments are all fine and good, but given the important role of logging, we really MUST describe how logging will work on the website after this patch is in. Would you be willing to add a chapter on logging below https://gnunet.org/libgnunetutil (like the IPC and crypto sections) once this patch is in?

LRN

2011-10-03 17:59

developer   ~0004677

1) Obviously fixable.
2) Why not ? At best it increases performance in typical situations (when most logging calls are not allowed). At worst it doesn't seem to affect anything.
3) Actually, my source comments aren't good. I mean the doxygen ones. I'll fix that. As for adding a chapter - ok, not a problem.

Next on the menu:
1) Add a macro that expands to GNUNET_YES or GNUNET_NO depending on configure arguments, and use it to define all debug constants. Should allow disabling/enabling all log calls at compile time.
I'm concerned about two things here:
  1.1) Some debug constants have multiple levels (i.e. GNUNET_YES + 1) when the code author wanted to have more than one level of verbosity. Not sure how to handle that. #define DEBUG_FOO GNUNET_ENABLE_EXTRA_LOGGING + GNUNET_ENABLE_EXTRA_LOGGING ? (assuming that GNUNET_ENABLE_EXTRA_LOGGING is defined to 1 or 0).
  1.2) Developers might want to manually switch certain log calls on and off in the old way - using the defines. With all defines using GNUNET_ENABLE_EXTRA_LOGGING macro, how will they do that?
Anyway, the configure option will look like this:
--enable-logging[=arg]
arg will be 'yes' (default, even if --enable-logging is not given; 'yes' does nothing, leaving only essential log calls enabled, just as things are now), 'no' (maybe add --disable-logging too?; 'no' will cause GNUNET_CULL_LOGGING to be defined, completely removing all calls) and 'debug' (will enable all log calls everywhere by defining GNUNET_ENABLE_EXTRA_LOGGING to 1)

2) Any improvements on logdef formatting? I think i can drop the mandatory terminating '/' easily (just check for '/' or '\0'), for example.

LRN

2011-10-04 12:51

developer   ~0004681

Ok, here are new patches (by the way, it's a bit gross - in the subject lines you can clearly see that these patches are, in fact, from 3 different batches - 1, then 2,3,4, then 5,6,7,8; but i decided against deleting everything and re-uploading the batch completely).

What's new:
1) GNUNET_FORCE_LOGFILE envvar can be used to force the logfile. Very cool for running testcases: no matter what the numerous config files say, everything will be logged THERE. Combine with narrow logdefs to really see only what you need.

2) get_log_call_status is now GNUNET_get_log_call_status! Isn't that just COOL? Comes very handy for ... er-r-r...well, it is handy, i'm sure.

3) Doxygen comments and just comments.

4) Trailing '/' in log definition is now optional (you still need it as separator if there is more than one definition)

5) The long-awaited --enable-logging[=value] is there[*]! (--disable-logging is also available). Values are:
no - culls the logging
yes - release build (no extra logging), this is default
verbose - lots of logging
veryverbose - same as 'verbose', but enables some REALLY verbose things (these are rare though)

[*] note, that while --enable-logging=[[very]verbose] does define the right macros in gnunet_config.h, the code is not yet converted to use them.

Christian Grothoff

2011-10-04 13:12

manager   ~0004682

Patches 1--8 applied to SVN as revision 17162.

Christian Grothoff

2011-10-04 15:25

manager   ~0004686

Patch 0001 applied as SVN 17173. That should be it.

Issue History

Date Modified Username Field Change
2011-09-29 21:09 LRN New Issue
2011-09-29 21:09 LRN File Added: 0001-Now-loglevels-may-be-set-per-component-at-runtime.patch
2011-09-29 23:43 Christian Grothoff Note Added: 0004654
2011-09-29 23:43 Christian Grothoff Assigned To => Christian Grothoff
2011-09-29 23:43 Christian Grothoff Status new => feedback
2011-09-29 23:43 Christian Grothoff Assigned To Christian Grothoff => LRN
2011-09-29 23:43 Christian Grothoff Status feedback => assigned
2011-09-29 23:44 Christian Grothoff Status assigned => feedback
2011-09-30 02:03 LRN Note Added: 0004655
2011-09-30 02:03 LRN Status feedback => assigned
2011-10-01 21:10 LRN File Added: 0002-Further-refinements-to-the-logger.patch
2011-10-01 21:22 LRN File Deleted: 0002-Further-refinements-to-the-logger.patch
2011-10-01 21:27 LRN File Added: 0002-Make-process_definition-static.patch
2011-10-01 21:27 LRN File Added: 0003-Further-refinements-to-the-logger.patch
2011-10-01 21:27 LRN File Added: 0004-Make-sure-that-defaults-aren-t-used-when-there-are-m.patch
2011-10-03 14:55 LRN File Added: log_measurements.ods
2011-10-03 16:57 Christian Grothoff Note Added: 0004676
2011-10-03 17:59 LRN Note Added: 0004677
2011-10-04 12:42 LRN File Added: 0005-Be-able-to-force-log-destination.patch
2011-10-04 12:42 LRN File Added: 0006-Add-GNUNET_-prefix-to-get_log_call_status.patch
2011-10-04 12:42 LRN File Added: 0007-Doxygen-comments-code-comment-and-small-changes.patch
2011-10-04 12:42 LRN File Added: 0008-Add-enable-logging-configure-option.patch
2011-10-04 12:51 LRN Note Added: 0004681
2011-10-04 13:12 Christian Grothoff Note Added: 0004682
2011-10-04 13:22 Christian Grothoff Target Version => 0.9.0pre4
2011-10-04 13:25 LRN File Added: 0001-Use-GNUNET_EXTRA_LOGGING-to-manage-compile-time-logg.patch
2011-10-04 15:25 Christian Grothoff Note Added: 0004686
2011-10-04 15:25 Christian Grothoff Status assigned => resolved
2011-10-04 15:25 Christian Grothoff Resolution open => fixed
2011-10-31 12:00 Christian Grothoff Status resolved => closed