The bug was caused by 'agent.parse' failing with Clamp::HelpWanted and
then we would continue onward to try and actually run the agent.
Now we only run the agent if parsing args succeeds.
Fixes LOGSTASH-1952
Audited files using 'Socket.gethostname' but didn't require "socket"
using the following command:
ack -L 'require "socket"' $(ack -l 'Socket.gethostname' lib)
Fixes LOGSTASH-1974
The clone {} filter will throw an exception if any of the values in the
event map are numbers. Problem is that numbers are not clonable.
This is a single-line fix that wraps the .clone call in a try block and
does a simple set-by-value if the clone raises an exception.
Included under spec/filters/clone.rb is a test case that fails without
the change in lib/logstash/event.rb and passes with the fix applied.
Users reported this (or similar) error:
Errno::ENOENT: No such file or directory -
lib/logstash/outputs/elasticsearch/elasticsearch-template.json
This is because the file being searched-for was relative to $PWD, not
relative to the elasticsearch output plugin file itself.
Tested works like this:
% logstash/bin/logstash -e 'output { elasticsearch { embedded => true } }'
Prior to this patch, the above command line would fail with this error:
Errno::ENOENT: No such file or directory - lib/logstash/outputs/elasticsearch/elasticsearch-template.json
...
get_template at /home/jls/projects/logstash/lib/logstash/outputs/elasticsearch.rb:285
As it turns out, programming is this terrible journey where we have
humans using some kind of silly error prone process whereby intent of
function is converted to instructions.
I am bad at programming sometimes.
Add two (2) new config stanzas to IRC output:
pre_string: Message you want emitted to IRC server before the event text
post_string: Message you want emitted to the IRC server after the event text
[12:32] <logstash> This is a pre message
[12:32] <logstash> This is the actual message
[12:32] <logstash> Tis is a post message
In both cases, they are sent as seperate messages to the IRC server, leaving the
event text unmodified.
(N.B. My 1st real modification to the ruby codebase, so someone who knows ruby
should really validate I did this correctly.)