在需要使用调试的文件中包含头文件logfile.h:
#define DENTER(function) \
static const char SGE_FUNC[] = function; \
error_printf("-> %s\n", function);
#define DEXIT \
error_printf("<- %s\n", SGE_FUNC);
#define DPRINTF(msg) \
error_printf(" "); \
error_printf msg
void
error_set(DWORD id, LPSTR message);
void
error_print(void);
int
error_printf(const char *fmt, ...);
void
error_set_tracingenabled(BOOL new_state);
int
error_open_tracefile(TXCHAR tracefile);
int
error_close_tracefile(void);
#endif