Untested, but I think you can simplify this considerably as follows: Exec if $SourceName =~ /^(yum|su(do))$/ $dst = $1;
Regards, Mark Sent from my iPad > On Dec 18, 2013, at 7:51 AM, "Paul Fontenot" <ssdv6...@gmail.com> wrote: > > I think I've been looking at this for too long and now can't see the forest > for the trees, I'm receiving the following error > > 2013-12-18 08:47:43 ERROR Couldn't parse Exec block at > /etc/nxlog.d/01-local.conf:42;couldn't parse statement at line 42, character > 31 in /etc/nxlog.d/01-local.conf;syntax error, unexpected {, expecting ( > > When using this > > 31 <Output uds_out> > 32 Module om_file > 33 Exec if $SourceName == yum { \ > 34 $dst = 'yum'; \ > 35 } \ > 36 else if $SourceName == su { \ > 37 $dst = 'su'; \ > 38 } \ > 39 else if $SourceName == sudo { \ > 40 $dst = 'sudo'; \ > 41 } \ > 42 else $dst = 'message'; > 43 File '%LOGDIR%/' + $dst + '.log' > 44 Exec to_syslog_bsd(); > 45 </Output> > > And I'm at a loss, when I was using $Sourcename =~ /something/ it was > working fine - I now have a regulatory requirement to separate su & sudo so > I'm looking into $SourceName == something > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > nxlog-ce-users mailing list > nxlog-ce-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users > > This message has been scanned by CanIt-PRO. > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > Teach CanIt if this mail (ID 01L33Qx2V) is spam: > Spam: > https://canit.willingminds.com/canit/b.php?i=01L33Qx2V&m=be76db2a5bcd&c=s > Not spam: > https://canit.willingminds.com/canit/b.php?i=01L33Qx2V&m=be76db2a5bcd&c=n > Forget vote: > https://canit.willingminds.com/canit/b.php?i=01L33Qx2V&m=be76db2a5bcd&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ nxlog-ce-users mailing list nxlog-ce-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users