diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-29 08:35:26 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-29 08:35:26 +0000 |
commit | 8b73362a4a88aaa3642db398d17e65eab871d9ed (patch) | |
tree | 8a0d6b8de07781a347a081cb876e9868016ee627 /syslogd.h | |
parent | 16bf2379c0400f72cba72063b3f2edce14236f34 (diff) | |
download | rsyslog-8b73362a4a88aaa3642db398d17e65eab871d9ed.tar.gz rsyslog-8b73362a4a88aaa3642db398d17e65eab871d9ed.tar.bz2 rsyslog-8b73362a4a88aaa3642db398d17e65eab871d9ed.zip |
- improved debug support a bit (assertions)
- restructured code, moved some part out of syslogd.c to action.c, where
they belong (still some more to do in that regard ;))
Diffstat (limited to 'syslogd.h')
-rw-r--r-- | syslogd.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -81,6 +81,19 @@ extern int DisableDNS; extern char **StripDomains; extern char *LocalDomain; extern int bDropMalPTRMsgs; -extern char ctty[]; +extern char ctty[]; +extern int MarkInterval; + +/* Intervals at which we flush out "message repeated" messages, + * in seconds after previous message is logged. After each flush, + * we move to the next interval until we reach the largest. + * TODO: move this to action object! + */ +extern int repeatinterval[2]; +#define MAXREPEAT ((int)((sizeof(repeatinterval) / sizeof(repeatinterval[0])) - 1)) +#define REPEATTIME(f) ((f)->f_time + repeatinterval[(f)->f_repeatcount]) +#define BACKOFF(f) { if (++(f)->f_repeatcount > MAXREPEAT) \ + (f)->f_repeatcount = MAXREPEAT; \ + } #endif /* #ifndef SYSLOGD_H_INCLUDED */ |