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.");
|
||||
users = users_alloc();
|
||||
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");
|
||||
count = users_add(users, "username", "authorisation");
|
||||
mxs_log_flush_sync();
|
||||
|
@ -52,14 +52,12 @@
|
||||
|
||||
#if defined(SS_DEBUG) && defined(LOG_ASSERT)
|
||||
#include <log_manager.h>
|
||||
# define ss_dassert(exp) if(!(exp)){(skygw_log_write(LE,\
|
||||
"debug assert %s:%d\n", \
|
||||
(char*)__FILE__, \
|
||||
__LINE__));mxs_log_flush_sync();assert(exp);}
|
||||
#define ss_info_dassert(exp,info) if(!(exp)){(skygw_log_write(LE,\
|
||||
"debug assert %s:%d %s\n", \
|
||||
(char*)__FILE__, \
|
||||
__LINE__,info));mxs_log_flush_sync();assert(exp);}
|
||||
# define ss_dassert(exp) do { if(!(exp)){\
|
||||
MXS_ERROR("debug assert %s:%d\n", (char*)__FILE__, __LINE__);\
|
||||
mxs_log_flush_sync(); assert(exp);} } while (false)
|
||||
#define ss_info_dassert(exp,info) do { if(!(exp)){\
|
||||
MXS_ERROR("debug assert %s:%d %s\n", (char*)__FILE__, __LINE__, info);\
|
||||
mxs_log_flush_sync();assert(exp);} } while (false)
|
||||
# define ss_debug(exp) exp
|
||||
# define ss_dfprintf fprintf
|
||||
# define ss_dfflush fflush
|
||||
|
Reference in New Issue
Block a user