Hi, On Fri, 31 Jul 2015 20:02:14 -0700 (PDT) David Lang <da...@lang.hm> wrote:
> <Input mark> > ... > Exec set_var('logcount', 5 ); > Exec set_var('logcount', ( get_var('logcount') + 1 ) ); This is obviously 6. > <Input eventlog> > .. > Exec if size($raw_event) > get_var('maxsize') { set_var('maxsize', > size($raw_event)); } This will never hold true because nxlog uses three-valued logic, so "X > undef" will be always undef. > Exec $logcount = get_var('logcount'); > Exec set_var('logcount', get_var('logcount') +1 ); The same stands for addition, undef+1 is undef. Perhaps this will need to be revisited some day as it seems to trick a lot of people. > Second, I want to eliminate the CR in the log line, but the replace() > call doesn't seem to have any effect (I tries the same thing but with > $Message instead of $raw_event, no difference) The CRLF is added in the LineBased formatter after the Exec has been evaluated. I know the CR confuses rsyslog. There are plans to make this configurable. Right now the workaround is this: Exec $raw_event = $raw_event + "\n"; OutputType Dgram > Third, on outputs, doe the Exec lines take effect before the output or > after? all the examples I can find use the exec for writing or rotating > a file. I'd like to move the message formatting from the inputs to the > outputs so it's not continually repeated. You can do that. Regards, Botond ------------------------------------------------------------------------------ _______________________________________________ nxlog-ce-users mailing list nxlog-ce-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users