Skip to content

Commit

Permalink
Update debug.h
Browse files Browse the repository at this point in the history
  • Loading branch information
liudf0716 committed Apr 17, 2017
1 parent 93d3e62 commit c4fbb5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion debug.h
Expand Up @@ -22,11 +22,16 @@
/** @file debug.h
@brief Debug output routines
@author Copyright (C) 2004 Philippe April <papril777@yahoo.com>
@author Copyright (C) 2016 Dengfeng Liu <liudengfeng@kunteng.org>
*/

#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 */
Expand All @@ -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 *, ...);
Expand Down

0 comments on commit c4fbb5d

Please sign in to comment.