/**
 * @file debug_msg.c Debug Message function
 */
/* $Id$ */
#include "gangliaconf.h"

int debug_level = 0;

/**
 * @fn void debug_msg(const char *format, ...)
 * Prints the message to STDERR if DEBUG is #defined
 * @param format The format of the msg (see printf manpage)
 * @param ... Optional arguments
 */
void
debug_msg(const char *format, ...)
{
   if (debug_level > 1 && format)
      {
         va_list ap;
         va_start(ap, format);
         vfprintf(stderr, format, ap);
         fprintf(stderr,"\n");
         va_end(ap);
      } 
   return;
}

/**
 * @file debug_msg.c Debug Message function
 */
/* $Id$ */
#include "gangliaconf.h"

int debug_level = 0;

/**
 * @fn void debug_msg(const char *format, ...)
 * Prints the message to STDERR if DEBUG is #defined
 * @param format The format of the msg (see printf manpage)
 * @param ... Optional arguments
 */
void
debug_msg(const char *format, ...)
{
   if (debug_level && format)
      {
         va_list ap;
         va_start(ap, format);
         vfprintf(stderr, format, ap);
         fprintf(stderr,"\n");
         va_end(ap);
      } 
   return;
}

--- 
+++ 
@@ -15,7 +15,7 @@
 void
 debug_msg(const char *format, ...)
 {
-   if (debug_level && format)
+   if (debug_level > 1 && format)
       {
          va_list ap;
          va_start(ap, format);
Debug level 1 now only shows error messages (and no backgrounding in gmetad).

