git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1148 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-04-14 03:04:53 +00:00
parent cb28473398
commit d6d313884e
2 changed files with 18 additions and 2 deletions

View File

@ -148,9 +148,20 @@ static char *cut_path(char *in)
static void default_logger(char *file, const char *func, int line, int level, char *fmt, ...)
{
char *fp;
char data[1024];
va_list ap;
fp = cut_path(file);
fprintf(globals.log_stream, "%s:%d %s() %s", file, line, func, fmt);
va_start(ap, fmt);
vsnprintf(data, sizeof(data), fmt, ap);
fprintf(globals.log_stream, "%s:%d %s() %s", file, line, func, data);
va_end(ap);
}
static unsigned int next_id(void)

View File

@ -155,7 +155,12 @@ 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);
va_list ap;
va_start(ap, fmt);
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, ap);
va_end(ap);
}
static void get_codecs(struct private_object *tech_pvt)