goat3d

annotate src/log.cc @ 16:cb6c1a945a11

goat3d is starting to become functional inch by inch
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 26 Sep 2013 14:16:09 +0300
parents
children 1d85d7dd0038
rev   line source
nuclear@16 1 #include <stdio.h>
nuclear@16 2 #include <stdarg.h>
nuclear@16 3 #include "log.h"
nuclear@16 4
nuclear@16 5 int goat_log_level = 256;
nuclear@16 6
nuclear@16 7 void logmsg(int prio, const char *fmt, ...)
nuclear@16 8 {
nuclear@16 9 fprintf(stderr, "goat3d error: ");
nuclear@16 10
nuclear@16 11 va_list ap;
nuclear@16 12
nuclear@16 13 if(prio < goat_log_level) {
nuclear@16 14 return;
nuclear@16 15 }
nuclear@16 16
nuclear@16 17 va_start(ap, fmt);
nuclear@16 18 vfprintf(stderr, fmt, ap);
nuclear@16 19 va_end(ap);
nuclear@16 20 }