- logging

This commit is contained in:
Thomas Ries
2006-06-23 21:45:31 +00:00
parent b2722b0db3
commit 3cc74d37d0
4 changed files with 15 additions and 13 deletions
+5 -3
View File
@@ -193,9 +193,11 @@ default_expires = 600
# DBCLASS_DNS 0x00000040 // DNS stuff
# DBCLASS_NETTRAF 0x00000080 // network traffic
# DBCLASS_CONFIG 0x00000100 // configuration
# DBCLASS_RTP 0x00000200 // RTP proxy
# DBCLASS_ACCESS 0x00000400 // Access list evaluation
# DBCLASS_AUTH 0x00000800 // Authentication
# DBCLASS_RTP 0x00000200 // RTP proxy
# DBCLASS_ACCESS 0x00000400 // Access list evaluation
# DBCLASS_AUTH 0x00000800 // Authentication
# DBCLASS_PLUGIN 0x00001000 // Plugins
# DCLASS_RTPBABL 0x00002000 // RTP babble
#
debug_level = 0x00000000
+5 -5
View File
@@ -43,7 +43,7 @@ static char const ident[]="$Id$";
/* module local variables */
static int log_to_stderr=0;
static int debug_pattern=0;
static unsigned int debug_pattern=0;
static int debug_listen_port=0;
static int debug_listen_fd=0;
@@ -66,12 +66,12 @@ static int silence_level=1;
*/
static pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
void log_set_pattern(int pattern) {
void log_set_pattern(unsigned int pattern) {
debug_pattern=pattern;
return;
}
int log_get_pattern(void) {
unsigned int log_get_pattern(void) {
return debug_pattern;
}
@@ -209,7 +209,7 @@ void log_tcp_connect(void) {
*/
void log_debug(int class, char *file, int line, const char *format, ...) {
void log_debug(unsigned int class, char *file, int line, const char *format, ...) {
va_list ap, ap_copy;
time_t t;
struct tm *tim;
@@ -437,7 +437,7 @@ void log_info(char *file, int line, const char *format, ...) {
}
void log_dump_buffer(int class, char *file, int line,
void log_dump_buffer(unsigned int class, char *file, int line,
char *buffer, int length) {
int i, j;
char tmp[8], tmplin1[80], tmplin2[80];
+4 -4
View File
@@ -39,8 +39,8 @@
#define DBCLASS_ALL 0xffffffff /* All classes */
void log_set_pattern(int pattern);
int log_get_pattern(void);
void log_set_pattern(unsigned int pattern);
unsigned int log_get_pattern(void);
void log_set_stderr(int tostdout);
void log_set_silence(int level);
void log_set_listen_port(int port);
@@ -58,7 +58,7 @@ void log_tcp_connect(void);
#define DEBUG(F...) log_debug(1,__FILE__, __LINE__,F)
#define DEBUGC(C,F...) log_debug(C,__FILE__, __LINE__,F)
void log_debug(int class, char *file, int line, const char *format, ...) GNUC_PRINTF(4, 5);
void log_debug(unsigned int class, char *file, int line, const char *format, ...) GNUC_PRINTF(4, 5);
#define ERROR(F...) log_error(__FILE__, __LINE__,F)
void log_error(char *file, int line, const char *format, ...) GNUC_PRINTF(3, 4);
@@ -71,5 +71,5 @@ void log_info(char *file, int line, const char *format, ...) GNUC_PRINTF(3, 4);
/* tobedone: dump a buffer */
#define DUMP_BUFFER(C,F,L) log_dump_buffer(C,__FILE__, __LINE__,F,L)
void log_dump_buffer(int class, char *file, int line,
void log_dump_buffer(unsigned int class, char *file, int line,
char *buffer, int length);
+1 -1
View File
@@ -56,7 +56,7 @@ typedef struct {
* configuration option table
*/
struct siproxd_config {
int debuglevel;
unsigned int debuglevel;
int debugport;
char *inbound_if;
char *outbound_if;