Orb/Doxygen/addon/doxmlparser/src/debug.cpp
author Michel Szarindar <Michel.Szarindar@Nokia.com>
Thu, 18 Mar 2010 18:26:18 +0000
changeset 1 82f11024044a
parent 0 42188c7ea2d9
permissions -rw-r--r--
Contribution of a new version of ORB and CXX DITA plug-in bug 1461 bug 1621 bug 1962

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#include "debug.h"

static int s_debugLevel = 0;

void debug(int level,const char *msg,...)
{
  if (level<=s_debugLevel)
  {
    va_list args;
    va_start(args, msg);
    vfprintf(stderr, msg, args);
    va_end(args); 
  }
}

void setDebugLevel(int level)
{
  s_debugLevel = level;
}