forked from OpenSIPS/opensips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxlog.h
63 lines (50 loc) · 1.52 KB
/
xlog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Copyright (C) 2001-2003 FhG Fokus
*
* This file is part of opensips, a free SIP server.
*
* opensips 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
*
* opensips 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _XLOG_H_
#define _XLOG_H_
#include "pvar.h"
typedef struct _xl_level
{
int type;
union {
long level;
pv_spec_t sp;
} v;
} xl_level_t, *xl_level_p;
typedef struct _xl_trace
{
struct sip_msg* msg;
str buf;
} xl_trace_t;
extern int xlog_buf_size;
extern int xlog_force_color;
extern int xlog_print_level;
extern int *xlog_level;
int xlog_1(struct sip_msg*, char*);
int xlog_2(struct sip_msg*, char*, char*);
int xdbg(struct sip_msg*, char*);
int pv_parse_color_name(pv_spec_p sp, const str *in);
int pv_get_color(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int init_xlog(void);
void set_shared_xlog_level(int new_level);
void set_local_xlog_level(int new_level);
void reset_xlog_level(void);
#endif