Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Features/xmldecoder #340

Closed
wants to merge 8 commits into from
Closed

Features/xmldecoder #340

wants to merge 8 commits into from

Conversation

crankycoder
Copy link
Contributor

This fixes #310 and adds a PayloadXmlDecoder to decode XML blobs.

I've also pulled out the Severity and TimestampLayout documentation for PayloadRegex, PayloadJsonand PayloadXml decoders so that it's consistent across all Payload*Decoders.

ISO8601 timestamp layout is a new default for the PayloadRegexDecoder.

The moovweb/gokogiri XML parser is a binding over libxml2 which is tricky to compile on Windows and on OSX, you'll need Homebrew: Homebrew/legacy-homebrew#19030

Do we want to push this into a build-constraint so that we only run this on Linux?

@trink
Copy link
Contributor

trink commented Jul 30, 2013

I would say no on the Linux build constraint (XML parsing is needed on Windows too).

Brainstorming:
With the new build system we could detect libxml2 and if it exists install the plugin code to the Go workspace. The files would have to be placed in a different directory or the build would have to cherry pick files in pipeline to install. Also, the all_specs_test.go would have to be auto generated (I am assuming we want to keep everything in the pipeline package to avoid a bunch of test issues). A similar approach could be applied to for the Sandbox (#343) using a configuration flag as opposed to library detection. The down side is that build configuration could become as involved as hekad configuration but it would be custom tailored to what you have installed and want to use (at this point we could probably generate a nice configuration template too).

Conflicts:
	pipeline/config.go
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement PayloadXmlDecoder
2 participants