X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=libs%2Fgoat3d%2Fsrc%2Flog.c;fp=libs%2Fgoat3d%2Fsrc%2Flog.c;h=f41f28c59583017ff14b2980d53d2819291585a9;hb=d5f45e3128c537f272615cf76242e1dfebccdee7;hp=0000000000000000000000000000000000000000;hpb=dd7ce87b0ad2b8a1b4758bcc9354e993b71c8599;p=raydungeon diff --git a/libs/goat3d/src/log.c b/libs/goat3d/src/log.c new file mode 100644 index 0000000..f41f28c --- /dev/null +++ b/libs/goat3d/src/log.c @@ -0,0 +1,36 @@ +/* +goat3d - 3D scene, and animation file format library. +Copyright (C) 2013-2018 John Tsiombikas + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see . +*/ +#include +#include +#include "log.h" + +int goat3d_log_level = 256; + +void goat3d_logmsg(int prio, const char *fmt, ...) +{ + va_list ap; + + if(goat3d_log_level < prio) { + return; + } + + fprintf(stderr, "goat3d: "); + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); +}