forked from liudf0716/xkcptun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,16 @@ | |
/** @file debug.h | ||
@brief Debug output routines | ||
@author Copyright (C) 2004 Philippe April <[email protected]> | ||
@author Copyright (C) 2016 Dengfeng Liu <[email protected]> | ||
*/ | ||
|
||
#ifndef _WIFIDOG_DEBUG_H_ | ||
#define _WIFIDOG_DEBUG_H_ | ||
|
||
#include <string.h> | ||
|
||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) | ||
|
||
typedef struct _debug_conf { | ||
int debuglevel; /**< @brief Debug information verbosity */ | ||
int log_stderr; /**< @brief Output log to stdout */ | ||
|
@@ -41,7 +46,7 @@ extern debugconf_t debugconf; | |
* @param level Debug level | ||
* @param format... sprintf like format string | ||
*/ | ||
#define debug(level, format...) _debug(__FILE__, __LINE__, level, format) | ||
#define debug(level, format...) _debug(__FILENAME__, __LINE__, level, format) | ||
|
||
/** @internal */ | ||
void _debug(const char *, int, int, const char *, ...); | ||
|