obidebug.h for debugging tools
This commit is contained in:
29
src/obidebug.h
Normal file
29
src/obidebug.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* obidebug.h
|
||||||
|
*
|
||||||
|
* Created on: June 25th 2015
|
||||||
|
* Author: Celine Mercier (celine.mercier@metabarcoding.org)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
|
||||||
|
//#ifndef DEBUG_LEVEL
|
||||||
|
//#define DEBUG_LEVEL MAXINT
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
|
||||||
|
//#ifdef OBIDEBUG
|
||||||
|
#define obidebug(debug_level, message, ...) \
|
||||||
|
{if (debug_level > DEBUG_LEVEL) \
|
||||||
|
{fprintf(stderr, "DEBUG %s:%d:%s, obi_errno = %d, errno = %d : " \
|
||||||
|
message "\n", __FILE__, __LINE__, __func__, obi_errno, errno, ##__VA_ARGS__); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
//#else
|
||||||
|
//#define obidebug(debug_level, message, ...)
|
||||||
|
//#endif
|
Reference in New Issue
Block a user