From 28d49887eb19ce0bd6f43c9f3afdb57233156713 Mon Sep 17 00:00:00 2001 From: David Butler Date: Thu, 11 Jan 2018 11:15:14 -0800 Subject: [PATCH] Version bump, documentation updates, changelog [ci-skip] --- CHANGELOG.md | 6 ++++- README.md | 41 ++++++++++++++++++++++++++++++---- lib/logstash-logger/version.rb | 2 +- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a3befc..3afdcd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ -## Master +## 0.26.0 - Allow user configuration of the logger class. [#129](https://github.com/dwbutler/logstash-logger/pull/129) - Fix: Allow type to be a string for multi_logger and syslog. [#131](https://github.com/dwbutler/logstash-logger/pull/131) +- Fix: Cancelled events are being logged. [#133](https://github.com/dwbutler/logstash-logger/issues/133) +- Fix: Expose method to reset logger state. [#138](https://github.com/dwbutler/logstash-logger/pull/138) +- Use specific AWS SDK gems. [#136](https://github.com/dwbutler/logstash-logger/pull/136) +- Adds support for using the default AWS credential provider chain. [#141](https://github.com/dwbutler/logstash-logger/pull/141) ## 0.25.1 diff --git a/README.md b/README.md index 09a23c8..21d0251 100644 --- a/README.md +++ b/README.md @@ -568,10 +568,10 @@ config.logstash.backoff = 1 Add the aws-sdk gem to your Gemfile: - # aws-sdk < 3.0 + # aws-sdk >= 3.0 gem 'aws-sdk-kinesis' - # aws-sdk >= 3.0 + # aws-sdk < 3.0 gem 'aws-sdk' ```ruby @@ -596,10 +596,10 @@ config.logstash.aws_secret_access_key = 'ASKASKHLD1234123412341234' Add the aws-sdk gem to your Gemfile: - # aws-sdk < 3.0 + # aws-sdk >= 3.0 gem 'aws-sdk-firehose' - # aws-sdk >= 3.0 + # aws-sdk < 3.0 gem 'aws-sdk' ```ruby @@ -710,6 +710,36 @@ def track_load_balancer_session_id end ``` +## Cleaning up resources when forking + +If your application forks (as is common with many web servers) you will need to +manage cleaning up resources on your LogStashLogger instances. The instance method +`#reset` is available for this purpose. Here is sample configuration for +several common web servers used with Rails: + +Passenger: +```ruby +::PhusionPassenger.on_event(:starting_worker_process) do |forked| + Rails.logger.reset +end +``` + +Puma: +```ruby +# In config/puma.rb +on_worker_boot do + Rails.logger.reset +end +``` + +Unicorn +```ruby +# In config/unicorn.rb +after_fork do |server, worker| + Rails.logger.reset +end +``` + ## Ruby Compatibility Verified to work with: @@ -837,6 +867,9 @@ logger = LogStashLogger.new('localhost', 5228, :tcp) * [Sergey Pyankov](https://github.com/esergion) * [Alec Hoey](https://github.com/alechoey) * [Alexey Krasnoperov](https://github.com/AlexeyKrasnoperov) +* [Gabriel de Oliveira](https://github.com/gdeoliveira) +* [Vladislav Syabruk](https://github.com/SeTeM) +* [Matus Vacula](https://github.com/matus-vacula) ## Contributing diff --git a/lib/logstash-logger/version.rb b/lib/logstash-logger/version.rb index 420c31c..3e28cd0 100644 --- a/lib/logstash-logger/version.rb +++ b/lib/logstash-logger/version.rb @@ -1,3 +1,3 @@ module LogStashLogger - VERSION = "0.25.1" + VERSION = "0.26.0" end