rack-common_logger-fluent 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,10 +21,6 @@ rack middleware for writing access log to fluentd.
21
21
  end
22
22
  use Rack::CommonLogger::Fluent, 'myapp', logger, format
23
23
 
24
- == WARN
25
-
26
- THIS PROJECT is early development. compatibility may break.
27
-
28
24
  == Contributing to rack-common_logger-fluent
29
25
 
30
26
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
data/bin/flgrep CHANGED
@@ -1,7 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'optparse'
4
- require 'json'
4
+ begin
5
+ require 'yajl'
6
+ require 'yajl/json_gem'
7
+ rescue LoadError => e
8
+ require 'json'
9
+ end
5
10
  require 'time'
6
11
 
7
12
  def main(argv)
@@ -67,6 +67,7 @@ module Rack
67
67
  # http_version: rack's HTTP_VERSION
68
68
  # http_status: response code. (Fixnum)
69
69
  # user_agent: User-Agent request header.
70
+ # referer: Referer request header.
70
71
  # content_type: Content-Type response header.
71
72
  # content_length: Content-Length response header.(Fixnum)
72
73
  # runtime: seconds of application running. (Float)
@@ -83,6 +84,7 @@ module Rack
83
84
  hash["http_version"] = info[:env]["HTTP_VERSION"]
84
85
  hash["http_status"] = info[:status].to_s[0..3].to_i
85
86
  hash["user_agent"] = info[:env]["HTTP_USER_AGENT"]
87
+ hash["referer"] = info[:env]["HTTP_REFERER"]
86
88
  hash["content_type"] = info[:header]["Content-Type"]
87
89
  hash["content_length"] = info[:header]["Content-Length"] ? info[:header]["Content-Length"].to_i : nil
88
90
  hash["runtime"] = info[:runtime]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rack-common_logger-fluent"
8
- s.version = "0.4.0"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Keiji, Yoshimi"]
12
- s.date = "2012-06-08"
12
+ s.date = "2012-06-22"
13
13
  s.description = "rack middleware for writing access log to fluentd. "
14
14
  s.email = "walf443@gmail.com"
15
15
  s.executables = ["flgrep"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-common_logger-fluent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluent-logger
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: 3298616844027280028
147
+ hash: -2039101058931125198
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements: