File: grok_config.h

package info (click to toggle)
grok 1.20110708.1-4.3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,460 kB
  • sloc: ansic: 3,469; ruby: 987; makefile: 276; sh: 124; yacc: 106
file content (29 lines) | stat: -rw-r--r-- 992 bytes parent folder | download | duplicates (5)
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
#include "grok_program.h"

#define CURPROGRAM (conf->programs[conf->nprograms - 1])
#define CURINPUT (CURPROGRAM.inputs [CURPROGRAM.ninputs - 1])
#define CURMATCH (CURPROGRAM.matchconfigs [CURPROGRAM.nmatchconfigs - 1])
#define CURPATTERNFILE (CURPROGRAM.patternfiles [CURPROGRAM.npatternfiles - 1])

#define SETLOG(parent, mine) \
  (mine).logmask = (parent).logmask;

  //(mine).logmask = ((mine).logmask == 0) ? (parent).logmask : (mine).logmask

struct config {
  grok_program_t *programs;
  int nprograms;
  int program_size;

  int logmask;
  int logdepth;
};

void conf_init(struct config *conf);
void conf_new_program(struct config *conf);
void conf_new_input(struct config *conf);
void conf_new_input_process(struct config *conf, char *cmd);
void conf_new_input_file(struct config *conf, char *filename);
void conf_new_matchconf(struct config *conf);
void conf_new_match_pattern(struct config *conf, const char *pattern);
void conf_match_set_debug(struct config *conf, int logmask);