add logger

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1147 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-04-14 02:05:29 +00:00
parent 9503c9a8ac
commit cb28473398
3 changed files with 78 additions and 26 deletions

View File

@@ -153,7 +153,10 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
static ldl_status handle_response(ldl_handle_t *handle, char *id);
static switch_status load_config(void);
static void dl_logger(char *file, const char *func, int line, int level, char *fmt, ...)
{
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, fmt);
}
static void get_codecs(struct private_object *tech_pvt)
{
@@ -1050,6 +1053,7 @@ static switch_status load_config(void)
} else if (!strcasecmp(cfg.category, "interface")) {
if (!globals.init) {
ldl_global_init(globals.debug);
ldl_global_set_logger(dl_logger);
globals.init = 1;
}