diff --git a/Makefile b/Makefile index 79dc90fd..53adb863 100644 --- a/Makefile +++ b/Makefile @@ -108,8 +108,8 @@ setup_root: build/setup_root prepare: | fix_version setup_root - @go version >/dev/null || (echo "Go not found. You need to install Go version 1.2-1.4: http://golang.org/doc/install"; false) - @go version | grep -q 'go version go1.[234]' || (echo "Go version 1.2-1.4, you have a version of Go that is not supported."; false) + @go version >/dev/null || (echo "Go not found. You need to install Go version 1.2-1.5: http://golang.org/doc/install"; false) + @go version | grep -q 'go version go1.[2345]' || (echo "Go version 1.2-1.5, you have a version of Go that is not supported."; false) @echo "GOPATH: $${GOPATH}" bin/%: prepare diff --git a/README.md b/README.md index 48dbb9c3..6507d5a6 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ then be installed using `yum install log-courier`. * **CentOS/RedHat 6.x**: [driskell-log-courier-epel-6.repo](https://copr.fedoraproject.org/coprs/driskell/log-courier/repo/epel-6/driskell-log-courier-epel-6.repo) * **CentOS/RedHat 7.x**: -[driskell-log-courier-epel-7.repo](https://copr.fedoraproject.org/coprs/driskell/log-courier/repo/epel-6/driskell-log-courier-epel-7.repo) +[driskell-log-courier-epel-7.repo](https://copr.fedoraproject.org/coprs/driskell/log-courier/repo/epel-7/driskell-log-courier-epel-7.repo) Once installed, create a configuration file at `/etc/log-courier/log-courier.conf` to suit your needs, then start the Log diff --git a/contrib/rpm/log-courier.spec b/contrib/rpm/log-courier.spec index 1ac728df..0721a658 100644 --- a/contrib/rpm/log-courier.spec +++ b/contrib/rpm/log-courier.spec @@ -6,7 +6,7 @@ Summary: Log Courier Name: log-courier Version: 1.8 Release: 1%{dist} -License: GPL +License: Apache Group: System Environment/Libraries Packager: Jason Woods URL: https://github.com/driskell/log-courier diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 95879f61..c526abc2 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -4,6 +4,7 @@ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* +- [1.8.2](#182) - [1.8.1](#181) - [1.8](#18) - [1.7](#17) @@ -24,6 +25,23 @@ +## 1.8.2 + +*30th October 2015* + +***Log Courier*** + +No Changes + +***RPM Packaging*** + +* Fixed incorrect license specification - the spec file specified GPL which was +incorrect - the license is Apache. The spec file has been updated. + +***Logstash Plugins*** + +* Introduce compatibility with Logstash 2.0.0 (#245) + ## 1.8.1 *7th August 2015* diff --git a/lib/log-courier/server.rb b/lib/log-courier/server.rb index 7c612e63..63274b3f 100644 --- a/lib/log-courier/server.rb +++ b/lib/log-courier/server.rb @@ -76,7 +76,7 @@ def initialize(options = {}) def run(&block) # TODO: Make queue size configurable - event_queue = EventQueue.new 1 + @event_queue = EventQueue.new 1 server_thread = nil begin @@ -87,7 +87,7 @@ def run(&block) when 'PING' process_ping message, comm when 'JDAT' - process_jdat message, comm, event_queue + process_jdat message, comm, @event_queue else if comm.peer.nil? @logger.warn 'Unknown message received', :from => 'unknown' unless @logger.nil? @@ -102,7 +102,9 @@ def run(&block) end loop do - block.call event_queue.pop + event = @event_queue.pop + break if event.nil? + block.call event end ensure # Signal the server thread to stop @@ -114,6 +116,10 @@ def run(&block) return end + def stop + @event_queue << nil + end + private def process_ping(message, comm) diff --git a/lib/logstash/inputs/courier.rb b/lib/logstash/inputs/courier.rb index 0d6e2d72..294bb6c0 100644 --- a/lib/logstash/inputs/courier.rb +++ b/lib/logstash/inputs/courier.rb @@ -107,6 +107,10 @@ def run(output_queue) end end + def stop + @log_courier.stop + end + private def options diff --git a/logstash-input-courier.gemspec.tmpl b/logstash-input-courier.gemspec.tmpl index fe27b9ad..3b492d00 100644 --- a/logstash-input-courier.gemspec.tmpl +++ b/logstash-input-courier.gemspec.tmpl @@ -15,6 +15,6 @@ Gem::Specification.new do |gem| gem.metadata = { 'logstash_plugin' => 'true', 'logstash_group' => 'input' } - gem.add_runtime_dependency 'logstash-core', '~> 1.4' + gem.add_runtime_dependency 'logstash-core', '>= 1.4.0', '< 3.0.0' gem.add_runtime_dependency 'log-courier', '= ' end diff --git a/logstash-output-courier.gemspec.tmpl b/logstash-output-courier.gemspec.tmpl index 842bd785..75736f85 100644 --- a/logstash-output-courier.gemspec.tmpl +++ b/logstash-output-courier.gemspec.tmpl @@ -15,6 +15,6 @@ Gem::Specification.new do |gem| gem.metadata = { 'logstash_plugin' => 'true', 'logstash_group' => 'output' } - gem.add_runtime_dependency 'logstash-core', '~> 1.4' + gem.add_runtime_dependency 'logstash-core', '>= 1.4.0', '< 3.0.0' gem.add_runtime_dependency 'log-courier', '= ' end diff --git a/version_short.txt b/version_short.txt index a8fdfda1..53adb84c 100644 --- a/version_short.txt +++ b/version_short.txt @@ -1 +1 @@ -1.8.1 +1.8.2