mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 21:38:34 +00:00
wip
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4872 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
75c3314ad7
commit
651b725288
3 files changed
+128
-111
No files matched your search
@@ -3,6 +3,7 @@ BASE=../../../..
|
||||
LOCAL_CFLAGS = `$(BASE)/libs/apr/apr-1-config --cflags --cppflags --includes`
|
||||
LOCAL_CFLAGS += `$(BASE)/libs/apr-util/apu-1-config --includes`
|
||||
LOCAL_CFLAGS += `if test -f $(BASE)/.libs/libfreeswitch_la-switch_odbc.o ; then echo -DSWITCH_HAVE_ODBC; fi ;`
|
||||
LOCAL_CFLAGS += -w
|
||||
|
||||
IKS_DIR=$(BASE)/libs/iksemel
|
||||
IKS_LA=$(IKS_DIR)/src/libiksemel.la
|
||||
|
||||
@@ -708,13 +708,33 @@ static void terminate_session(switch_core_session_t **session, int line, switch_
|
||||
static void dl_logger(char *file, const char *func, int line, int level, char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char data[1024];
|
||||
char *data = NULL;
|
||||
int ret;
|
||||
|
||||
va_start(ap, fmt);
|
||||
if ((ret = switch_vasprintf(&data, fmt, ap)) != -1) {
|
||||
if (!strncasecmp(data, "+xml:", 5)) {
|
||||
switch_xml_t xml;
|
||||
char *form;
|
||||
char *ll = data + 5;
|
||||
char *xmltxt;
|
||||
|
||||
vsnprintf(data, sizeof(data), fmt, ap);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "%s", data);
|
||||
|
||||
if (ll) {
|
||||
if ((xmltxt = strchr(ll, ':'))) {
|
||||
*xmltxt++ = '\0';
|
||||
xml = switch_xml_parse_str(xmltxt, strlen(xmltxt));
|
||||
form = switch_xml_toxml(xml);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, level,
|
||||
"%s:\n-------------------------------------------------------------------------------\n"
|
||||
"%s\n", ll, form);
|
||||
switch_xml_free(xml);
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, level, "%s\n", data);
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user