mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Proper hash syntax, yay! Docs for LOGSTASH-728
This commit is contained in:
parent
a6542d73e0
commit
49c0d08c4c
1 changed files with 2 additions and 9 deletions
|
@ -80,17 +80,10 @@ The above makes 'path' a 3-element array including all 3 strings.
|
||||||
|
|
||||||
### <a name="hash"></a>Hash
|
### <a name="hash"></a>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:
|
The 'key' and 'value' are simply pairs, such as:
|
||||||
|
|
||||||
match => [ "field1", "pattern1", "field2", "pattern2" ]
|
match => { "field1" => "value1", "field2" => "value2", ... }
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Further reading
|
## Further reading
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue