dprint.c File Reference

Kamailio Debug console print functions. More...

#include "dprint.h"
#include "globals.h"
#include "pt.h"
#include <stdarg.h>
#include <stdio.h>
#include <strings.h>

Include dependency graph for dprint.c:

Go to the source code of this file.

Functions

int dp_my_pid (void)
 Small wrapper around my_pid.
void dprint (char *format,...)
 Logging function to STDERR.
void reset_proc_debug_level (void)
 Reset the server debug level to the previous value.
void set_proc_debug_level (int level)
 Set the server debug level, save the previous value.
int str2facility (char *s)
 Return the integer value of a log facility string.

Variables

char ctime_buf [256]
static int int_fac []
static int old_proc_level
static char * str_fac []


Detailed Description

Kamailio Debug console print functions.

Definition in file dprint.c.


Function Documentation

int dp_my_pid ( void   ) 

Small wrapper around my_pid.

Returns:
prozess ID

Definition at line 76 of file dprint.c.

References my_pid().

void dprint ( char *  format,
  ... 
)

Logging function to STDERR.

Parameters:
format log prefix
... more log output

Definition at line 82 of file dprint.c.

Referenced by handle_sigs().

void reset_proc_debug_level ( void   ) 

Reset the server debug level to the previous value.

Definition at line 122 of file dprint.c.

References debug, NULL, and old_proc_level.

Referenced by do_action().

void set_proc_debug_level ( int  level  ) 

Set the server debug level, save the previous value.

Parameters:
level new debug level

Definition at line 100 of file dprint.c.

References debug, NULL, and old_proc_level.

Referenced by do_action().

int str2facility ( char *  s  ) 

Return the integer value of a log facility string.

Parameters:
s log facility
Returns:
log facility integer, or -1 on error

Definition at line 64 of file dprint.c.

References int_fac, and str_fac.

Referenced by mod_init().


Variable Documentation

char ctime_buf[256]

time buffer

Definition at line 61 of file dprint.c.

Referenced by dp_time().

int int_fac[] [static]

log facility int values

Definition at line 51 of file dprint.c.

Referenced by str2facility().

int old_proc_level [static]

Definition at line 95 of file dprint.c.

Referenced by reset_proc_debug_level(), and set_proc_debug_level().

char* str_fac[] [static]

log facility strings

Definition at line 40 of file dprint.c.

Referenced by str2facility().


Generated on Tue May 22 16:00:39 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6