Moved XMPP logging to jabber.c

This commit is contained in:
James Booth
2012-02-12 22:10:30 +00:00
parent 7aa1d931a0
commit af46792871
3 changed files with 16 additions and 18 deletions

17
log.c
View File

@@ -1,26 +1,9 @@
#include <stdio.h>
#include <strophe/strophe.h>
#include "log.h"
extern FILE *logp;
void xmpp_file_logger(void * const userdata, const xmpp_log_level_t level,
const char * const area, const char * const msg);
static const xmpp_log_t file_log = { &xmpp_file_logger, XMPP_LEVEL_DEBUG };
xmpp_log_t *xmpp_get_file_logger()
{
return (xmpp_log_t*) &file_log;
}
void xmpp_file_logger(void * const userdata, const xmpp_log_level_t level,
const char * const area, const char * const msg)
{
log_msg(area, msg);
}
void log_msg(const char * const area, const char * const msg)
{
fprintf(logp, "%s DEBUG: %s\n", area, msg);