improve logging function
This commit is contained in:
parent
c9714b2a7d
commit
2d1bf3042b
3 changed files with 9 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.gch
|
|
@ -7,6 +7,11 @@ void dbg_setlevel(int Level)
|
||||||
debug_level=Level;
|
debug_level=Level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dbg_getlevel()
|
||||||
|
{
|
||||||
|
return debug_level;
|
||||||
|
}
|
||||||
|
|
||||||
void dbg_printf(int Level, const char *fmt, ...)
|
void dbg_printf(int Level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
if (Level <= debug_level)
|
if (Level <= debug_level)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
void dbg_setlevel(int Level);
|
void dbg_setlevel(int Level);
|
||||||
|
int dbg_getlevel();
|
||||||
void dbg_printf(int Level, const char *fmt, ...);
|
void dbg_printf(int Level, const char *fmt, ...);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in a new issue