Browse code

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

Daniel-Constantin Mierla authored on 21/10/2015 07:47:56
Showing 2 changed files
... ...
@@ -290,6 +290,8 @@ LOGFACILITY	log_facility
290 290
 LOGNAME		log_name
291 291
 LOGCOLOR	log_color
292 292
 LOGPREFIX	log_prefix
293
+LOGENGINETYPE	log_engine_type
294
+LOGENGINEDATA	log_engine_data
293 295
 LISTEN		listen
294 296
 ADVERTISE	advertise|ADVERTISE
295 297
 ALIAS		alias
... ...
@@ -671,6 +673,8 @@ IMPORTFILE      "import_file"
671 671
 <INITIAL>{LOGNAME}	{ yylval.strval=yytext; return LOGNAME; }
672 672
 <INITIAL>{LOGCOLOR}	{ yylval.strval=yytext; return LOGCOLOR; }
673 673
 <INITIAL>{LOGPREFIX}	{ yylval.strval=yytext; return LOGPREFIX; }
674
+<INITIAL>{LOGENGINETYPE}	{ yylval.strval=yytext; return LOGENGINETYPE; }
675
+<INITIAL>{LOGENGINEDATA}	{ yylval.strval=yytext; return LOGENGINEDATA; }
674 676
 <INITIAL>{LISTEN}	{ count(); yylval.strval=yytext; return LISTEN; }
675 677
 <INITIAL>{ADVERTISE}	{ count(); yylval.strval=yytext; return ADVERTISE; }
676 678
 <INITIAL>{ALIAS}	{ count(); yylval.strval=yytext; return ALIAS; }
... ...
@@ -320,6 +320,8 @@ extern char *default_routename;
320 320
 %token LOGNAME
321 321
 %token LOGCOLOR
322 322
 %token LOGPREFIX
323
+%token LOGENGINETYPE
324
+%token LOGENGINEDATA
323 325
 %token LISTEN
324 326
 %token ADVERTISE
325 327
 %token ALIAS
... ...
@@ -775,6 +777,10 @@ assign_stm:
775 775
 	| LOGCOLOR EQUAL error { yyerror("boolean value expected"); }
776 776
 	| LOGPREFIX EQUAL STRING { log_prefix_fmt=$3; }
777 777
 	| LOGPREFIX EQUAL error { yyerror("string value expected"); }
778
+	| LOGENGINETYPE EQUAL STRING { _km_log_engine_type=$3; }
779
+	| LOGENGINETYPE EQUAL error { yyerror("string value expected"); }
780
+	| LOGENGINEDATA EQUAL STRING { _km_log_engine_data=$3; }
781
+	| LOGENGINEDATA EQUAL error { yyerror("string value expected"); }
778 782
 	| DNS EQUAL NUMBER   { received_dns|= ($3)?DO_DNS:0; }
779 783
 	| DNS EQUAL error { yyerror("boolean value expected"); }
780 784
 	| REV_DNS EQUAL NUMBER { received_dns|= ($3)?DO_REV_DNS:0; }