improve logging function

This commit is contained in:
psa-jforestier 2020-09-08 18:20:50 +02:00
parent c9714b2a7d
commit 2d1bf3042b
3 changed files with 9 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.o
*.a
*.gch

View file

@ -7,6 +7,11 @@ void dbg_setlevel(int Level)
debug_level=Level;
}
int dbg_getlevel()
{
return debug_level;
}
void dbg_printf(int Level, const char *fmt, ...)
{
if (Level <= debug_level)

View file

@ -5,6 +5,7 @@
#include <stdarg.h>
void dbg_setlevel(int Level);
int dbg_getlevel();
void dbg_printf(int Level, const char *fmt, ...);
#endif