skypopen: nice formatted debug output (I feel so stupid when I use one full hour for things like this, but I like it ;) )
This commit is contained in:
parent
5f91e46914
commit
cda952083f
|
@ -103,14 +103,14 @@ typedef enum {
|
|||
GFLAG_MY_CODEC_PREFS = (1 << 0)
|
||||
} GFLAGS;
|
||||
|
||||
#define DEBUGA_SKYPE(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_SKYPE %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
|
||||
#define DEBUGA_CALL(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_CALL %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
|
||||
#define DEBUGA_PBX(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_PBX %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
|
||||
#define ERRORA(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][ERRORA %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
|
||||
#define WARNINGA(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][WARNINGA %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
|
||||
#define NOTICA(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][NOTICA %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
|
||||
#define DEBUGA_SKYPE(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%-*s ["SKYPOPEN_SVN_VERSION "]\t [DEBUG_SKYPE %-5d][%-15s][%s,%s] " __VA_ARGS__ );
|
||||
#define DEBUGA_CALL(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%-*s ["SKYPOPEN_SVN_VERSION "]\t [DEBUG_CALL %-5d][%-15s][%s,%s] " __VA_ARGS__ );
|
||||
#define DEBUGA_PBX(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%-*s ["SKYPOPEN_SVN_VERSION "]\t [DEBUG_PBX %-5d][%-15s][%s,%s] " __VA_ARGS__ );
|
||||
#define ERRORA(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%-*s ["SKYPOPEN_SVN_VERSION "]\t [ERRORA %-5d][%-15s][%s,%s] " __VA_ARGS__ );
|
||||
#define WARNINGA(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%-*s["SKYPOPEN_SVN_VERSION "]\t [WARNINGA %-5d][%-15s][%s,%s] " __VA_ARGS__ );
|
||||
#define NOTICA(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "%-*s ["SKYPOPEN_SVN_VERSION "]\t [NOTICA %-5d][%-15s][%s,%s] " __VA_ARGS__ );
|
||||
|
||||
#define SKYPOPEN_P_LOG NULL, (unsigned long)55, __LINE__, tech_pvt ? tech_pvt->name ? tech_pvt->name : "none" : "none", -1, tech_pvt ? tech_pvt->interface_state : -1, tech_pvt ? tech_pvt->skype_callflow : -1
|
||||
#define SKYPOPEN_P_LOG (int)((25 - (strlen(__FILE__))) + ((__LINE__ - 1000) < 0)), " ", __LINE__, tech_pvt ? tech_pvt->name ? tech_pvt->name : "none" : "none", tech_pvt ? interface_status[tech_pvt->interface_state] : "N/A", tech_pvt ? skype_callflow[tech_pvt->skype_callflow] : "N/A"
|
||||
|
||||
/*********************************/
|
||||
#define SKYPOPEN_CAUSE_NORMAL 1
|
||||
|
|
|
@ -15,6 +15,8 @@ extern switch_endpoint_interface_t *skypopen_endpoint_interface;
|
|||
int samplerate_skypopen = SAMPLERATE_SKYPOPEN;
|
||||
|
||||
extern int running;
|
||||
extern char *interface_status[];
|
||||
extern char *skype_callflow[];
|
||||
|
||||
/*************************************/
|
||||
/* suspicious globals FIXME */
|
||||
|
|
Loading…
Reference in New Issue