Module: kamailio
Branch: master
Commit: 88b06d1f6a1d8101504f4d644a406cbe6675dd73
URL:
https://github.com/kamailio/kamailio/commit/88b06d1f6a1d8101504f4d644a406cb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-10-21T09:51:54+02:00
core: added parameters log_engine_type and log_engine_data
- can be used to specify what logging engine to be used and its
initialization data
- see readme of log_custom module for a same of usage
---
Modified: cfg.lex
Modified: cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/88b06d1f6a1d8101504f4d644a406cb…
Patch:
https://github.com/kamailio/kamailio/commit/88b06d1f6a1d8101504f4d644a406cb…
---
diff --git a/cfg.lex b/cfg.lex
index dc7ddcb..5aeadf0 100644
--- a/cfg.lex
+++ b/cfg.lex
@@ -290,6 +290,8 @@ LOGFACILITY log_facility
LOGNAME log_name
LOGCOLOR log_color
LOGPREFIX log_prefix
+LOGENGINETYPE log_engine_type
+LOGENGINEDATA log_engine_data
LISTEN listen
ADVERTISE advertise|ADVERTISE
ALIAS alias
@@ -671,6 +673,8 @@ IMPORTFILE "import_file"
<INITIAL>{LOGNAME} { yylval.strval=yytext; return LOGNAME; }
<INITIAL>{LOGCOLOR} { yylval.strval=yytext; return LOGCOLOR; }
<INITIAL>{LOGPREFIX} { yylval.strval=yytext; return LOGPREFIX; }
+<INITIAL>{LOGENGINETYPE} { yylval.strval=yytext; return LOGENGINETYPE; }
+<INITIAL>{LOGENGINEDATA} { yylval.strval=yytext; return LOGENGINEDATA; }
<INITIAL>{LISTEN} { count(); yylval.strval=yytext; return LISTEN; }
<INITIAL>{ADVERTISE} { count(); yylval.strval=yytext; return ADVERTISE; }
<INITIAL>{ALIAS} { count(); yylval.strval=yytext; return ALIAS; }
diff --git a/cfg.y b/cfg.y
index 0b62aec..aa9b0ca 100644
--- a/cfg.y
+++ b/cfg.y
@@ -320,6 +320,8 @@ extern char *default_routename;
%token LOGNAME
%token LOGCOLOR
%token LOGPREFIX
+%token LOGENGINETYPE
+%token LOGENGINEDATA
%token LISTEN
%token ADVERTISE
%token ALIAS
@@ -775,6 +777,10 @@ assign_stm:
| LOGCOLOR EQUAL error { yyerror("boolean value expected"); }
| LOGPREFIX EQUAL STRING { log_prefix_fmt=$3; }
| LOGPREFIX EQUAL error { yyerror("string value expected"); }
+ | LOGENGINETYPE EQUAL STRING { _km_log_engine_type=$3; }
+ | LOGENGINETYPE EQUAL error { yyerror("string value expected"); }
+ | LOGENGINEDATA EQUAL STRING { _km_log_engine_data=$3; }
+ | LOGENGINEDATA EQUAL error { yyerror("string value expected"); }
| DNS EQUAL NUMBER { received_dns|= ($3)?DO_DNS:0; }
| DNS EQUAL error { yyerror("boolean value expected"); }
| REV_DNS EQUAL NUMBER { received_dns|= ($3)?DO_REV_DNS:0; }