#include "log.h"

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

static int verb;

int log_get_verbosity()
{
  return verb;
}

void log_set_verbosity(int v)
{
  verb = v;
}

void log_printf(int v, const char *s, ...)
{
  va_list   vlist; 
  if (verb < v)
    return;
  va_start(vlist, s); 
  vfprintf(stdout, s, vlist);
  va_end(vlist);
}

int log_level(int v)
{
  if (verb < v)
    return 0;
  else
    return 1;
}
