Now that this is out of the way, the developers that use these JBoss logs have asked if they can be rotated every 6 hours or 300M - which ever comes first, obviously I just fudged my way through the size portion of this request. Is it as simple as adding a Schedule block to that Output block for rotating every 6 hours?
-----Original Message----- From: Botond Botyanszki [mailto:b...@nxlog.org] Sent: Monday, January 06, 2014 11:16 AM To: nxlog-ce-users@lists.sourceforge.net Subject: Re: [nxlog-ce-users] Size based log rotation error Hi, Because the backslash escapes the linebreaks, lines 91-95 are fed into the evaluator as a single line. If you do the same in a text editor, i.e. convert this into a single line, and then go to the location stated in the error message (character position 141), you should find the cause of the syntax error there or nearby. There is clearly a syntax error in the snippet you posted, but I won't tell you what it is so that you can find it yourself. ;) Regards, Botond On Mon, 6 Jan 2014 11:04:05 -0700 "Paul Fontenot" <ssdv6...@gmail.com> wrote: > I am attempting to rotate some logs based on size and am using the > following from the example in the nxlog documentation > > 91 Exec if jbossOut->file_size() > 5M { \ > 92 $newfile = "%JBOSSDIR%/" + $Hostname + > "/" + $Hostname + "-" + $dst + "-" strftime(now(), "%Y%m%d%H%M%S" + > ".log"); \ > 93 jbossOut->rotate_to($newfile); \ > 94 exec_async("/usr/bin/bzip2", $newfile); \ > 95 } > > And it's throwing this error and I can't figure out what is causing > this unless its another instance where I'm getting bit by globbing. > > 2014-01-06 11:01:39 ERROR Couldn't parse Exec block at > /etc/nxlog.d/01-jboss-logs.conf:95;couldn't parse statement at line > 95, character 141 in /etc/nxlog.d/01-jboss-logs.conf;syntax error, > unexpected TOKEN_FUNCPROC, expecting ; > > > ---------------------------------------------------------------------- > -------- 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.c > lktrk _______________________________________________ > nxlog-ce-users mailing list > nxlog-ce-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users ---------------------------------------------------------------------------- -- 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 ------------------------------------------------------------------------------ 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