xlog.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <ctype.h>
#include "../../sr_module.h"
#include "../../dprint.h"
#include "../../error.h"
#include "../../mem/mem.h"
#include "xl_lib.h"
#include "../../pvar.h"

Include dependency graph for xlog.c:

Go to the source code of this file.

Data Structures

struct  _xl_level

Defines

#define append_sstring(p, end, s)
#define COL_BUF   10

Typedefs

typedef struct _xl_levelxl_level_p
typedef struct _xl_level xl_level_t

Functions

void destroy (void)
static int mod_init (void)
static int pv_get_color (struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
int pv_parse_color_name (pv_spec_p sp, str *in)
static int xdbg (struct sip_msg *, char *, char *)
static int xdbg_fixup (void **param, int param_no)
static int xlog_1 (struct sip_msg *, char *, char *)
static int xlog_2 (struct sip_msg *, char *, char *)
static int xlog_fixup (void **param, int param_no)

Variables

int buf_size = 4096
static cmd_export_t cmds []
struct module_exports exports
int force_color = 0
MODULE_VERSION char * log_buf = NULL
static pv_export_t mod_items []
static param_export_t params []


Define Documentation

#define append_sstring ( p,
end,
s   ) 

Definition at line 373 of file xlog.c.

Referenced by pv_get_color().

#define COL_BUF   10

Definition at line 371 of file xlog.c.

Referenced by pv_get_color().


Typedef Documentation

typedef struct _xl_level * xl_level_p

typedef struct _xl_level xl_level_t


Function Documentation

void destroy ( void   ) 

destroy function

static int mod_init ( void   )  [static]

module functions

init module function

Definition at line 123 of file xlog.c.

References buf_size, LM_ERR, log_buf, NULL, and pkg_malloc.

static int pv_get_color ( struct sip_msg msg,
pv_param_t param,
pv_value_t res 
) [static]

int pv_parse_color_name ( pv_spec_p  sp,
str in 
)

static int xdbg ( struct sip_msg msg,
char *  frm,
char *  str2 
) [static]

Definition at line 193 of file xlog.c.

References buf_size, is_printable, L_DBG, LM_GEN1, log_buf, and xl_print_log().

static int xdbg_fixup ( void **  param,
int  param_no 
) [static]

Definition at line 277 of file xlog.c.

References E_UNSPEC, force_color, _str::len, LM_ERR, log_stderr, pv_parse_format(), _str::s, and s.

Referenced by xlog_fixup().

static int xlog_1 ( struct sip_msg msg,
char *  frm,
char *  str2 
) [static]

Definition at line 136 of file xlog.c.

References buf_size, is_printable, L_ERR, LM_GEN1, log_buf, and xl_print_log().

static int xlog_2 ( struct sip_msg msg,
char *  lev,
char *  frm 
) [static]

static int xlog_fixup ( void **  param,
int  param_no 
) [static]


Variable Documentation

int buf_size = 4096

parameters

Definition at line 48 of file xlog.c.

Referenced by mod_init(), xdbg(), xlog_1(), and xlog_2().

cmd_export_t cmds[] [static]

Definition at line 83 of file xlog.c.

module exports

Definition at line 105 of file xlog.c.

int force_color = 0

Definition at line 49 of file xlog.c.

Referenced by pv_get_color(), and xdbg_fixup().

MODULE_VERSION char* log_buf = NULL

Id
xlog.c 5276 2008-11-27 15:31:51Z anomarme

Copyright (C) 2001-2003 FhG Fokus

This file is part of Kamailio, a free SIP server.

Kamailio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version

Kamailio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition at line 45 of file xlog.c.

pv_export_t mod_items[] [static]

Initial value:

 {
   { {"C", sizeof("C")-1}, PVT_OTHER, pv_get_color, 0,
      pv_parse_color_name, 0, 0, 0 },
   { {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
}

Definition at line 76 of file xlog.c.

param_export_t params[] [static]

Initial value:

{
   {"buf_size",     INT_PARAM, &buf_size},
   {"force_color",  INT_PARAM, &force_color},
   {0,0,0}
}

Definition at line 97 of file xlog.c.


Generated on Fri May 25 00:00:45 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6