summaryrefslogtreecommitdiff
path: root/libmultipath/debug.c
blob: dc69d6fcfb3d1c7fe89355cc1e6adf1b0f85a7a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#include "config.h"

void condlog (int prio, char * fmt, ...)
{
	va_list ap;
	int thres;

	if (!conf)
		thres = 0;
	else
		thres = conf->verbosity;

	va_start(ap, fmt);

	if (prio <= thres) {
		vfprintf(stdout, fmt, ap);
		fprintf(stdout, "\n");
	}
	va_end(ap);
}