semlogger 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/semlogger.rb +6 -3
- data/lib/semlogger/rack.rb +2 -3
- metadata +35 -49
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/lib/semlogger.rb
CHANGED
@@ -64,6 +64,11 @@ class Semlogger < ::Logger
|
|
64
64
|
end
|
65
65
|
|
66
66
|
attr_accessor :logdev, :level, :progname
|
67
|
+
|
68
|
+
# some libs use #log_level
|
69
|
+
def log_level=( level) @level = level end
|
70
|
+
def log_level() @level end
|
71
|
+
|
67
72
|
class <<self
|
68
73
|
attr_accessor :progname, :logger
|
69
74
|
|
@@ -110,9 +115,7 @@ class Semlogger < ::Logger
|
|
110
115
|
|
111
116
|
def add severity, message = nil, progname = nil, &block
|
112
117
|
severity ||= UNKNOWN
|
113
|
-
if @logdev.nil? or severity < @level
|
114
|
-
return true
|
115
|
-
end
|
118
|
+
return true if @logdev.nil? or severity < @level
|
116
119
|
progname ||= @progname
|
117
120
|
if message.nil?
|
118
121
|
if block_given?
|
data/lib/semlogger/rack.rb
CHANGED
@@ -4,10 +4,9 @@ class Semlogger::Rack < Rails::Rack::Logger
|
|
4
4
|
@data = data
|
5
5
|
end
|
6
6
|
|
7
|
-
def call_app env
|
8
|
-
request = ActionDispatch::Request.new env
|
7
|
+
def call_app request, env
|
9
8
|
path = request.filtered_path
|
10
|
-
|
9
|
+
Semlogger.custom( :connection, request.ip, Thread.current.object_id, request.request_method, path).info
|
11
10
|
@app.call env
|
12
11
|
ensure
|
13
12
|
ActiveSupport::LogSubscriber.flush_all!
|
metadata
CHANGED
@@ -1,46 +1,41 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: semlogger
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
version: 0.0.8
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.9
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Denis Knauf
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-11-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 0
|
30
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
31
22
|
type: :runtime
|
32
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
33
30
|
description: (Semi-)Structured Logger for Ruby (and Rails)
|
34
|
-
email:
|
31
|
+
email:
|
35
32
|
- Denis.Knauf@gmail.com
|
36
33
|
executables: []
|
37
|
-
|
38
34
|
extensions: []
|
39
|
-
|
40
|
-
extra_rdoc_files:
|
35
|
+
extra_rdoc_files:
|
41
36
|
- LICENSE
|
42
37
|
- README.md
|
43
|
-
files:
|
38
|
+
files:
|
44
39
|
- AUTHORS
|
45
40
|
- LICENSE
|
46
41
|
- README.md
|
@@ -53,37 +48,28 @@ files:
|
|
53
48
|
- lib/semlogger/rotate.rb
|
54
49
|
- lib/semlogger/tailer.rb
|
55
50
|
- lib/semlogger/writer.rb
|
56
|
-
has_rdoc: true
|
57
51
|
homepage: http://github.com/DenisKnauf/semlogger
|
58
52
|
licenses: []
|
59
|
-
|
60
53
|
post_install_message:
|
61
54
|
rdoc_options: []
|
62
|
-
|
63
|
-
require_paths:
|
55
|
+
require_paths:
|
64
56
|
- lib
|
65
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
58
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
|
72
|
-
version: "0"
|
73
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
64
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
79
|
-
- 0
|
80
|
-
version: "0"
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
81
69
|
requirements: []
|
82
|
-
|
83
70
|
rubyforge_project:
|
84
|
-
rubygems_version: 1.
|
71
|
+
rubygems_version: 1.8.23
|
85
72
|
signing_key:
|
86
73
|
specification_version: 3
|
87
74
|
summary: (Semi-)Structured Logger
|
88
75
|
test_files: []
|
89
|
-
|