ss_dassert() no longer uses skygw_log_write.
Use of skygw_log_write() in ss_dassert and ss_info_dassert replaced with the use of MXS_ERROR(). In addition, ss_dassert and ss_info_dassert are now expressions that require a trailing ;.
This commit is contained in:
@ -59,7 +59,7 @@ int result, count;
|
|||||||
"testusers : Initialise the user table.");
|
"testusers : Initialise the user table.");
|
||||||
users = users_alloc();
|
users = users_alloc();
|
||||||
mxs_log_flush_sync();
|
mxs_log_flush_sync();
|
||||||
ss_info_dassert(NULL != users, "Allocating user table should not return NULL.")
|
ss_info_dassert(NULL != users, "Allocating user table should not return NULL.");
|
||||||
ss_dfprintf(stderr, "\t..done\nAdd a user");
|
ss_dfprintf(stderr, "\t..done\nAdd a user");
|
||||||
count = users_add(users, "username", "authorisation");
|
count = users_add(users, "username", "authorisation");
|
||||||
mxs_log_flush_sync();
|
mxs_log_flush_sync();
|
||||||
|
@ -52,14 +52,12 @@
|
|||||||
|
|
||||||
#if defined(SS_DEBUG) && defined(LOG_ASSERT)
|
#if defined(SS_DEBUG) && defined(LOG_ASSERT)
|
||||||
#include <log_manager.h>
|
#include <log_manager.h>
|
||||||
# define ss_dassert(exp) if(!(exp)){(skygw_log_write(LE,\
|
# define ss_dassert(exp) do { if(!(exp)){\
|
||||||
"debug assert %s:%d\n", \
|
MXS_ERROR("debug assert %s:%d\n", (char*)__FILE__, __LINE__);\
|
||||||
(char*)__FILE__, \
|
mxs_log_flush_sync(); assert(exp);} } while (false)
|
||||||
__LINE__));mxs_log_flush_sync();assert(exp);}
|
#define ss_info_dassert(exp,info) do { if(!(exp)){\
|
||||||
#define ss_info_dassert(exp,info) if(!(exp)){(skygw_log_write(LE,\
|
MXS_ERROR("debug assert %s:%d %s\n", (char*)__FILE__, __LINE__, info);\
|
||||||
"debug assert %s:%d %s\n", \
|
mxs_log_flush_sync();assert(exp);} } while (false)
|
||||||
(char*)__FILE__, \
|
|
||||||
__LINE__,info));mxs_log_flush_sync();assert(exp);}
|
|
||||||
# define ss_debug(exp) exp
|
# define ss_debug(exp) exp
|
||||||
# define ss_dfprintf fprintf
|
# define ss_dfprintf fprintf
|
||||||
# define ss_dfflush fflush
|
# define ss_dfflush fflush
|
||||||
|
Reference in New Issue
Block a user