add units to time, use configuration time api where appropriate, fixing Mantis #1875
[oweals/gnunet.git] / src / util / test_common_logging.c
index da200d62a4a1b81f9b88183b69112c580890a19f..d057db099cc074ff38ad94a2d412a57e7a9c3cda 100644 (file)
@@ -27,8 +27,8 @@
 #include "gnunet_common.h"
 
 static void
-my_log (void *ctx, enum GNUNET_ErrorType kind,
-        const char *component, const char *date, const char *msg)
+my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component,
+        const char *date, const char *msg)
 {
   unsigned int *c = ctx;
 
@@ -43,6 +43,8 @@ main (int argc, char *argv[])
   unsigned int failureCount = 0;
   unsigned int logs = 0;
 
+  if (0 != putenv ("GNUNET_FORCE_LOG="))
+    fprintf (stderr, "Failed to putenv: %s\n", strerror (errno));
   GNUNET_log_setup ("test-common-logging", "DEBUG", "/dev/null");
   GNUNET_logger_add (&my_log, &logs);
   GNUNET_logger_add (&my_log, &logs);