- fix 2699
[oweals/gnunet.git] / src / util / common_logging.c
index 6161d0c6d0fc4569895047b7fe03afc8f5d29a70..000c33880538973d76af0c75ea9c2216c66c00af 100644 (file)
@@ -842,7 +842,7 @@ GNUNET_log_skip (int n, int check_reset)
     ok = (0 == skip_log);
     skip_log = 0;
     if (check_reset)
-      GNUNET_assert (ok);
+      GNUNET_break (ok);
   }
   else
   {
@@ -1189,6 +1189,45 @@ GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen)
 }
 
 
+/**
+ * Log error message about missing configuration option.
+ *
+ * @param kind log level
+ * @param section section with missing option
+ * @param option name of missing option
+ */
+void
+GNUNET_log_config_missing (enum GNUNET_ErrorType kind, 
+                          const char *section,
+                          const char *option)
+{
+  GNUNET_log (kind,
+             _("Configuration fails to specify option `%s' in section `%s'!\n"),
+             option,
+             section);
+}
+
+
+/**
+ * Log error message about invalid configuration option value.
+ *
+ * @param kind log level
+ * @param section section with invalid option
+ * @param option name of invalid option
+ * @param required what is required that is invalid about the option
+ */
+void
+GNUNET_log_config_invalid (enum GNUNET_ErrorType kind, 
+                          const char *section,
+                          const char *option,
+                          const char *required)
+{
+  GNUNET_log (kind,
+             _("Configuration specifies invalid value for option `%s' in section `%s': %s\n"),
+             option, section, required);
+}
+
+
 /**
  * Initializer
  */