Hi, This is a feature, not a bug, as documented here: http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html#xm_json_proc_to_json The reason is to avoid cyclic problems caused by this, since to_json() overwrites the $raw_event field. This will do what you need: $Message = $raw_event; to_json();
Regards, Botond On Wed, 26 Jun 2013 13:31:30 +0200 Mathieu GELI <[email protected]> wrote: > Hi, > > I'm using im_file input module with a line-based logfile and have an > "Exec to_json();" directive (tested on input and output). The problem > is that nxlog (MSI 2.4.1054) outputs a log whithout the actuall line > content, only metadata like : > > $timstamp1 machine {"EventReceivedTime": "$timestamp1", > "SourceModuleName": "$inputname", "SourceModuleType": "im_file"} > $timstamp2 machine {"EventReceivedTime": "$timestamp2", > "SourceModuleName": "$inputname", "SourceModuleType": "im_file"} > [...] > > The configuration to achieve that is the following : > > <Extension json> > Module xm_json > </Extension> > > <Input sec> > Module im_msvistalog > </Input> > > <Input file> > Module im_file > File "C:\\test.log" > InputType LineBased > </Input> > > <Output out> > Module om_tcp > Host 1.2.3.4 > Port 514 > Exec to_json(); > </Output> > > <Route 1> > Path file,sec => out > </Route> > > Is that a known bug ? Do you have to manually parse the log line to > get it builded into json ? I don't expect to have magically structured > fields but just a field Message="line content here" in my JSON export. > > Thanks for your help, > > -- > Mathieu > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > nxlog-ce-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ nxlog-ce-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
