I have now also created a new branch for this patch: v5-devel-david-imfile
I added the config variable. See the commit log for useful information and steps. While I was a bit hesitant to merge this patch soon to the official branch (due to the problems I had with imfile), I begin to think this is over-cautious. It should really not harm any existing code. So please let me know when you have finished your testing of the new code, I'll probably merge soon then.
Thanks! Rainer On 12/14/2010 04:57 AM, [email protected] wrote:
I discovered UnreadChar and so now mode 2 (indented follow-up lines) has a chance of working. again compile tested (and visually code-reviewed by someone else), but not executed. David Lang On Mon, 13 Dec 2010, [email protected] wrote:This is a first cut of a modification to imfile to let it read multi-line files. As-is, this should have no effect on a system as it hard-codes the mode to reading single lines (I really don't understand how to set a config variable, but for someone who does, it should be simple to replace the '0' in imfile.c with the value of the config file) With this config option change, it should be possible to real logfiles that have blank lines between multi-line log entries and have those log entries treated as a single line. I also have code in place (but disabled) to try and deal with the more complicated layout where all lines after the first one are indented if they are part of the same log entry. The problem I have is that when I discover that I have finished reading a log entry I have already read the first character of the next log entry. This extra character needs to be put pack into the input buffer, but I don't know if that is possible or not. If this isn't the case, I need a function that will let me peek at the next character in the input buffer and make my decision based on that. This compiles, but I have not tested it anywhere yet. with the hardcoded mode 0 for ('LF termination), there should be no change other than an extra test against a constant for each character read from a file. David Lang
_______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

