From 49c0d08c4cae6592c751f888f3155044ca8bc6a7 Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Sat, 15 Jun 2013 22:49:29 -0700 Subject: [PATCH] Proper hash syntax, yay! Docs for LOGSTASH-728 --- docs/configuration.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 5f98a0c6a..e8b55071a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -80,17 +80,10 @@ The above makes 'path' a 3-element array including all 3 strings. ### Hash -A 'hash' is currently represented using the same syntax as an array (see above). +A 'hash' is basically the same syntax as Ruby hashes. The 'key' and 'value' are simply pairs, such as: - match => [ "field1", "pattern1", "field2", "pattern2" ] - -The above would internally be represented as this hash: `{ "field1" => -"pattern1", "field2" => "pattern2" }` - -Why this syntax? Well frankly it was easier than adding additional grammar to -the config language. Logstash may support ruby- or json-like hash syntax in the -future, but not today. + match => { "field1" => "value1", "field2" => "value2", ... } ## Further reading