src/modules/logwatch.h
changeset 127 94e6c3b4230f
parent 121 4682ebbc5644
child 130 ffefb6d85ea6
equal deleted inserted replaced
126:8065a624ba37 127:94e6c3b4230f
    63     /** Our entry in logwatch::filters */
    63     /** Our entry in logwatch::filters */
    64     TAILQ_ENTRY(logwatch_filter) logwatch_filters;
    64     TAILQ_ENTRY(logwatch_filter) logwatch_filters;
    65 };
    65 };
    66 
    66 
    67 /**
    67 /**
       
    68  * Maximum number of capture groups in the filter's regexp
       
    69  */
       
    70 #define LOGWATCH_FILTER_GROUPS_MAX 16
       
    71 
       
    72 /**
       
    73  * Maximum length of output string, not including NUL byte
       
    74  */
       
    75 #define LOGWATCH_FILTER_OUT_MAX 450
       
    76 
       
    77 /**
    68  * A channel for outputting logwatch output
    78  * A channel for outputting logwatch output
    69  *
    79  *
    70  * XXX; do we need this?
    80  * XXX; do we need this?
    71  */
    81  */
    72 struct logwatch_chan {
    82 struct logwatch_chan {
   127 /**
   137 /**
   128  * Destroy a logwatch_filter, unregistering it
   138  * Destroy a logwatch_filter, unregistering it
   129  */
   139  */
   130 void logwatch_filter_destroy (struct logwatch_filter *filter);
   140 void logwatch_filter_destroy (struct logwatch_filter *filter);
   131 
   141 
       
   142 /**
       
   143  * Pass the given line (from the given source) through the given filter
       
   144  */
       
   145 err_t logwatch_filter_apply (const struct logwatch_filter *filter, const struct logwatch_source *source, const char *line, struct error_info *err);
       
   146 
       
   147 /**
       
   148  * Handle a line from the given source by applying it to all filters
       
   149  */
       
   150 void logwatch_on_line (struct logwatch *ctx, const struct logwatch_source *source, const char *line);
       
   151