From 2162bf42724d8b41fef824c612f8284ad85c3652 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Fri, 26 Jun 2015 17:56:15 +0200 Subject: [PATCH] obidebug.h for debugging tools --- src/obidebug.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/obidebug.h diff --git a/src/obidebug.h b/src/obidebug.h new file mode 100644 index 0000000..c6b4519 --- /dev/null +++ b/src/obidebug.h @@ -0,0 +1,29 @@ +/* + * obidebug.h + * + * Created on: June 25th 2015 + * Author: Celine Mercier (celine.mercier@metabarcoding.org) + */ + + +#include +#include +#include +#include + + +//#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