- Move helper functions in own modules and extend Rspec
- Refactor files into correct naming and paths
- Modify files to use new spec_helper and helpers
- Pin rspec to 2.14.x
Fixes#1758
The filter should only modify the event's fields and tags if and only if
all resolves/reverses succeed. So we clone the event, modify the new
copy and return it if all operations succeed. Otherwise the original
event is not modified.
For performance reasons we could reverse the clone logic: clone the
event, modify the original event and, it case of failure, return the
backup.
Note: this changes the dns filter behaviour towards add_tag
Fixes#1795
Addresses #1747.
This removes the argument list iteration and spawning of multiple
tasks.
It's still possible to specify aditional arguments but now they're
ignored.
PR: #1752
This will be used by the filter flush compiler
Add generation of a flush lambda for each filter.
This allows filters to flush and have any generated events proceed
downward through the config as you would expect, respecting any
branches or future plugins.
Die on IOError which occurs when reading from a closed STDIN
Make filter_flusher invoke the new (and correct, I hope!) way to flush.
- On shutdown, we will also flush all filters.
- The flusher thread will terminate if we are shutting down.
Clarify the comment
Fix comment generation in the code to avoid newlines.
Add 'max_age' setting to multiline for flushing.
This setting chooses how long (in seconds) an event is considered to be
fresh before it will be automatically flushed.
This is useful for:
* slow log sources to get the 'last event' flushed,
* transaction-id-style events that have no obvious "end" event and also
are mixed among other-id events in the same stream.
Also:
- Make filters have no teardown by default.
- Remove 'enable_flush' since it is not needed anymore; flush is always
enabled.
refactor flush
new spool filter and specs, mainly for testing flushing
turn off unrelated test error for now
fix the flush logic, fix the flush compiles code to not include output section
synchronize cross-thread access to @pending
refactor for performance and readability
synchronize cross-thread access to @spool
unused code
input:udp removed boggus ShutdownSignal handling, morphed loop do into while true, cosmetic reformat
use transcient events and not exceptions for in-flow pipeline signaling
inline flushing into filterworker
removed now unnecessary flushing thread safety
fix conditionals bug for new events generated by filters & specs
spec for issue #793
performance tweeks
simplify filter handling of events and new_events
this removes unecessary duplication when treating the original event as
a special case (different from new_events generated by a filter).
Also, since @filter_func only outputs non-cancelled events, some checks
were also removed.
Move multiple filter specs to a filter_chains file
append events generated by a filter using unshift instead of insert
closes#793, closes#1429, closes#1431, closes#1548
This allows sprintf to correctly print floats up to 15 decimal
places, which should be enough for most. Without this, very big
or very small floats will be converted to scientific notation.
closes#1670
Tests included.
Note about grammar compilation:
I had to use treetop 1.4.15 (1.5.3 generates ruby code that fails to
parse, haven't spent any time debugging)
Fixes#1513
Fix break_on_match issue while evaluating multiple patterns
Closes#1547
Make better exception message
Add more specs for inputs with arrays
Closes#1547
* Add spec tests for NaN support
* Catch warning on NaN with nan_handling set to warn
* Make lambdas ivars and initialize so they can reference other ivars
* Fixed reference to point to ivar
* Streamline ivar declarations in one method
* Improve tests to cover more cases
* Make lambdas not be ivars
* Change idiomatic calling of init_lambdas to reflect lack of return value
closes 1363
* Hash + Closures. Now replacing case/when statements with closures and hashes to improve performance
* Raise exceptions now instead of using `break`
* Zipped lines 163-164 per @colinsurprenant
* In line 280, this change is a regression. The authfile is tiny, so this should still be okay, and it's only read once. Tests failed without this change.
* Use `has_key?` instead of `include?()` in multiple places.
* In the spec/test, I fixed a typo that was bugging me.
With this commit, all tests pass!
```
$ bin/logstash rspec -fd spec/codecs/collectd.rb
Using Accessor#strict_set for specs
Run options: exclude {:redis=>true, :socket=>true, :performance=>true, :elasticsearch=>true, :broken=>true}
LogStash::Codecs::Collectd
None
should parse a normal packet
Sign
should parse a correctly signed packet
should not parse an incorrectly signed packet
Encrypt
should parse an encrypted packet
should not parse unencrypted packets when encrypt is configured
Finished in 2.1 seconds
5 examples, 0 failures
```
* master: (208 commits)
Fix for LOGSTASH-2093
Fix for LOGSTASH-2129
Bump Elasticsearch to 1.1.1 and Kibana to 3.0.1
Permit relative path or $PATH searches for the java command.
Add LS_LOG_DIR option
Improve package acceptance tests
Fix minor issues with acceptance test
Fix minor bug in init script found after acceptance test
Add gemfile
Initial commit of package acceptance testing
Typo
Copy-paste typo fix
Make embedded => true respect `bind_host` setting.
Start ES embedded server before creating a client.
fix and regression tests for github issue #1258
fix for undefined method + for nil:NilClass for invalid paramters
reenabled multiline filter specs, refactored concurent streams generator, cleaups
flush filters at end of test input
flush support in multiline filter
Adding new sysv init style scripts based on pleaserun
...