Hi,

I'm trying to parse a local log file in XML format and send it as GELF.

What I've tried for now is:

1 - Load the Extension

<Extension xml>
    Module      xm_xml
</Extension>

2 - Create an input with im_file

<Input loggerfailure>
    Module     im_file
    File     "pathtothelog.xml"
    Exec parse_xml();                            
 </Input>

3 - Set the output (that part's fine).

What happens is I get multiple GELF messages sent out, as obviously it doesn't 
seem to be able to understand what is the message and what the fields are.

The format I am looking at looks like:

<Exceptions>
 <Exception>
    <DateField>2013-06-20 1:30:57 PM</DateField>
    <Field1>text string</Field1>
    <Field2>text string</Field2>
    <Field3>text string</Field3>
    <Field4>text string</Field4>
    <Field5>text string</Field5>
    <Field6>text string</Field6>
    <Field7>text string</Field7>
  </Exception>
</Exceptions>

I've seen in the documentation (and used) for CSV parsing and W3C logs where 
the fields are specified after the module in the extension, but for xml Fields 
doesn't seem to be valid. I just want to be able to say each message is 
"Exception", each field is a field, parse the date field, and that "Exceptions" 
is just the root.

Thanks for any pointers.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
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

Reply via email to