add units to time, use configuration time api where appropriate, fixing Mantis #1875
[oweals/gnunet.git] / src / util / common_logging.c
index d564530ccf7bd9b7dd5240275805efd70794167d..e96fb8e7888339929bfcef011e0994766130f156 100644 (file)
@@ -260,6 +260,20 @@ resize_logdefs ()
   logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));
 }
 
+
+/**
+ * Abort the process, generate a core dump if possible.
+ */
+void
+GNUNET_abort ()
+{
+#if WINDOWS
+  DebugBreak();
+#endif
+  abort();
+}
+
+
 /**
  * Utility function - adds a parsed definition to logdefs array.
  *
@@ -546,7 +560,8 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
   component_nopid = GNUNET_strdup (comp);
 
   env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
-  if (env_logfile != NULL)
+  if ( (env_logfile != NULL) &&
+       (strlen (env_logfile) > 0) )
     logfile = env_logfile;
 
   if (logfile == NULL)