rails-graylogger 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 279bc568e2418b58a0f4f698710667247713aecf
4
- data.tar.gz: 91eccafa793d098055aa297c85ff5ceccfb5a69e
3
+ metadata.gz: e17ce4092cf19298b67ec7a88aecd891c978bc25
4
+ data.tar.gz: 24adeb14a13084adcd8aa6ad00b56742156e35a5
5
5
  SHA512:
6
- metadata.gz: 2379f5d90792bdb95f54e42e62c9df8c765e18dd686dbb09b41c9009c6a3854efabc67f4699ce7f92d17623fcfe4a2dbc59b892ec100a68b354ef141e5f3e378
7
- data.tar.gz: a3957f935b11597cd739cf821192a2a0551a9c92cc1269093c472e681e01a54be485546e972f245c95334b9094668a94ee87c5e340e15ecfc3fe199cdbc7fe0a
6
+ metadata.gz: ca44015daddd2a1cf57b269e77a820fa5c0d9e22581cbd2c25a06f2cf07d2ac54057fe5c6d19692755346c1729f9c2860ac8d7fbf69b3a9d0730f6cea5d3079d
7
+ data.tar.gz: 650ca4c86d6f54129b5360dd3397de0ee4feabbdb8a6e181f40bb7dadb5bbcfc4e63dc2cce25c01ab4ea05e26f3122f0b861f9341e353673e8720ea25293a09f
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ sudo: false
3
+ rvm:
4
+ - 2.2.0
5
+ - 2.1.5
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Rally Software Development Corp.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # rails-graylogger
2
2
  Rails logs to Graylog2
3
3
 
4
+ [![Build Status](https://travis-ci.org/flowdock/rails-graylogger.svg)](https://travis-ci.org/flowdock/rails-graylogger)
5
+
4
6
  # Configuring Middleware
5
7
  Add the following to config/application.rb:
6
8
 
@@ -5,6 +5,7 @@ module RailsGraylogger
5
5
  payload = event.payload
6
6
  payload[:path] = URI(payload[:path]).path if payload[:path]
7
7
  payload[:ipaddress] = RequestStore.store[:ipaddress]
8
+ payload[:x_forwarded_for] = RequestStore.store[:x_forwarded_for]
8
9
  payload[:duration] = event.duration.round
9
10
  payload[:status] = status_from_exception(payload[:exception]) unless payload[:status].present?
10
11
 
@@ -9,6 +9,7 @@ module RailsGraylogger
9
9
  logger = Rails.logger
10
10
  request = Rack::Request.new(env)
11
11
  RequestStore.store[:ipaddress] = request.ip
12
+ RequestStore.store[:x_forwarded_for] = request.env["HTTP_X_FORWARDED_FOR"]
12
13
 
13
14
  status, headers, body = @app.call(env)
14
15
 
@@ -1,3 +1,3 @@
1
1
  module RailsGraylogger
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.homepage = "https://github.com/flowdock/rails-graylogger"
11
11
  s.summary = "Push Rails logs also to Graylog2"
12
12
  s.description = s.summary
13
+ s.license = "MIT"
13
14
 
14
15
  s.add_dependency 'gelf', '~> 1.4.0'
15
16
  s.add_dependency 'activesupport', '~> 4'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-graylogger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tuomas Silen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gelf
@@ -88,7 +88,9 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
+ - ".travis.yml"
91
92
  - Gemfile
93
+ - LICENSE.txt
92
94
  - README.md
93
95
  - Rakefile
94
96
  - lib/rails-graylogger.rb
@@ -103,7 +105,8 @@ files:
103
105
  - spec/rails-graylogger/message_spec.rb
104
106
  - spec/spec_helper.rb
105
107
  homepage: https://github.com/flowdock/rails-graylogger
106
- licenses: []
108
+ licenses:
109
+ - MIT
107
110
  metadata: {}
108
111
  post_install_message:
109
112
  rdoc_options: []
@@ -121,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
124
  version: '0'
122
125
  requirements: []
123
126
  rubyforge_project:
124
- rubygems_version: 2.4.5
127
+ rubygems_version: 2.4.3
125
128
  signing_key:
126
129
  specification_version: 4
127
130
  summary: Push Rails logs also to Graylog2