diff options
| author | Christian Hopps <chopps@labn.net> | 2023-04-26 17:50:46 -0400 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-05-01 13:47:12 -0400 | 
| commit | cfa0facbf936fc6cc053fafea7d2b6fa8bccfc4c (patch) | |
| tree | 727b06f65947ae9702c691dfeb4dfe8951225ca8 /mgmtd/mgmt_txn.c | |
| parent | 13c426150fd4699466306d88a917df6493faf9bd (diff) | |
mgmtd: fully implement debug flags for mgmtd and clients
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt_txn.c')
| -rw-r--r-- | mgmtd/mgmt_txn.c | 14 | 
1 files changed, 2 insertions, 12 deletions
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index 05844653ce..ad4a4e31f4 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -14,20 +14,10 @@  #include "mgmtd/mgmt_memory.h"  #include "mgmtd/mgmt_txn.h" -#ifdef REDIRECT_DEBUG_TO_STDERR -#define MGMTD_TXN_DBG(fmt, ...)                                               \ -	fprintf(stderr, "%s: " fmt "\n", __func__, ##__VA_ARGS__) -#define MGMTD_TXN_ERR(fmt, ...)                                               \ -	fprintf(stderr, "%s: ERROR, " fmt "\n", __func__, ##__VA_ARGS__) -#else /* REDIRECT_DEBUG_TO_STDERR */  #define MGMTD_TXN_DBG(fmt, ...)                                                \ -	do {                                                                   \ -		if (mgmt_debug_txn)                                            \ -			zlog_debug("%s: " fmt, __func__, ##__VA_ARGS__);       \ -	} while (0) -#define MGMTD_TXN_ERR(fmt, ...)                                               \ +	DEBUGD(&mgmt_debug_txn, "%s:" fmt, __func__, ##__VA_ARGS__) +#define MGMTD_TXN_ERR(fmt, ...)                                                \  	zlog_err("%s: ERROR: " fmt, __func__, ##__VA_ARGS__) -#endif /* REDIRECT_DEBUG_TO_STDERR */  #define MGMTD_TXN_LOCK(txn) mgmt_txn_lock(txn, __FILE__, __LINE__)  #define MGMTD_TXN_UNLOCK(txn) mgmt_txn_unlock(txn, __FILE__, __LINE__)  | 
