2 * Copyright (C) 2007 Stig Venaas <venaas@uninett.no>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
15 static uint8_t debug_level = DBG_WARN;
17 void debug_set_level(uint8_t level) {
21 void debug(uint8_t level, char *format, ...) {
22 if (level >= debug_level) {
25 vfprintf(stderr, format, ap);
27 fprintf(stderr, "\n");