#pragma once #include #include #define NTR_LEVEL_NONE (0) #define NTR_LEVEL_ERROR (1) #define NTR_LEVEL_WARNING (2) #define NTR_LEVEL_INFO (3) #define NTR_LEVEL_DEBUG (4) #define NTR_LEVEL_DEFAULT (NTR_LEVEL_WARNING) #define NTR_DEP_NTR (0) #define NTR_DEP_USER1 (1) #define NTR_DEP_USER2 (2) #define NTR_DEP_USER3 (3) #define NTR_DEP_USER4 (4) #define NTR_DEP_USER5 (5) #define NTR_DEP_MAX (NTR_DEP_USER5 + 1) #ifdef __cplusplus extern "C" { #endif void ntr_init(); __attribute__((format(printf, 3, 4))) void ntr( int dep, int level, const char *fmt, ...); void ntr_set_level(int dep, int level); void ntr_set_output(FILE *f); int ntr_get_level(int dep); #ifdef __cplusplus } #endif