On Mon, 3 Aug 2015, David Lang wrote: > On Mon, 3 Aug 2015, Botond Botyanszki wrote: > >> 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. > > I tried settig the value to 0 in the mark message, why is it still undef here? > >>> Exec $logcount = get_var('logcount'); >>> Exec set_var('logcount', get_var('logcount') +1 ); >> The same stands for addition, undef+1 is undef. > > why is this undef after it's been set to '6' for the first time? > >> Perhaps this will need to be revisited some day as it seems to trick a >> lot of people.
after the first mark message is generated, and these three lines are executed Exec set_var('logcount', 5 ); Exec set_var('logcount', ( get_var('logcount') + 1 ) ); Exec set_var('maxsize', size($raw_event)); why are these two variables undef? David Lang ------------------------------------------------------------------------------ _______________________________________________ nxlog-ce-users mailing list nxlog-ce-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users