Newer
Older
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "debug.h"
void log_message(int level, const char *fmt, ...)
{
va_list args;
int iop_debug;
char *e = getenv("IOP_LLA_LIBS_DEBUG");
iop_debug = e ? atoi(e) : -1;
if (iop_debug < level)
return;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}