Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
driskell committed Oct 30, 2015
2 parents b78a693 + 4b4b2e8 commit afcee17
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/rpm/log-courier.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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 <packages@jasonwoods.me.uk>
URL: https://github.com/driskell/log-courier
Expand Down
18 changes: 18 additions & 0 deletions docs/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**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)
Expand All @@ -24,6 +25,23 @@

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## 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*
Expand Down
12 changes: 9 additions & 3 deletions lib/log-courier/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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?
Expand All @@ -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
Expand All @@ -114,6 +116,10 @@ def run(&block)
return
end

def stop
@event_queue << nil
end

private

def process_ping(message, comm)
Expand Down
4 changes: 4 additions & 0 deletions lib/logstash/inputs/courier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def run(output_queue)
end
end

def stop
@log_courier.stop
end

private

def options
Expand Down
2 changes: 1 addition & 1 deletion logstash-input-courier.gemspec.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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', '= <VERSION>'
end
2 changes: 1 addition & 1 deletion logstash-output-courier.gemspec.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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', '= <VERSION>'
end
2 changes: 1 addition & 1 deletion version_short.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.1
1.8.2

0 comments on commit afcee17

Please sign in to comment.