logjam_agent 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/lib/logjam_agent/buffered_logger.rb +22 -3
- data/lib/logjam_agent/syslog_like_formatter.rb +1 -1
- data/lib/logjam_agent/version.rb +1 -1
- metadata +84 -106
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MDlmYzcyNGJmZTJiMzM4OWZiMzY2M2QxMDA5ZTkxMTY2NTczMjUyYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTg4Y2NmNzdjZjNhMWI3MjZhZTQ2NGExNzExNmJiZjhhNGZhNmJjZQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTBjNDg1NmJmYjdiZTkzMWVhZjdkOWZhYmQxZDBlM2RkNGRmYmZhZDY5Yjlm
|
10
|
+
MWRiM2Q5YTNjZWJjNGM0ZjAzMWM3Njk5YmJiYzBkNzQwMGJkNWFkZDUzNGQx
|
11
|
+
Nzg1YTU3OGE4ZTFmYTJlMGMzZDEzYTYyNmZlMzMyZGU5ZDMyODY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NWY1NTE5NTMyOGI5ZTBlZGNkOWQ5ODM4MGJiYTMwMzE2YjQzNTcxZTNhMWYw
|
14
|
+
YWIxMzcyNDQ2MTlkNzg5ZTRjNmUzYzM0ZmNlYTg0MDBjYWZmNTExYzQyYjhk
|
15
|
+
MDAwYmZlYmJmYjhhMjE0MzUxYjUzODI5YmJiNWUzYjAzOTY2NjA=
|
data/.gitignore
CHANGED
@@ -3,6 +3,23 @@ require 'fileutils'
|
|
3
3
|
if ActiveSupport::VERSION::STRING < "4.0"
|
4
4
|
require 'active_support/buffered_logger'
|
5
5
|
require 'active_support/core_ext/logger'
|
6
|
+
if ActiveSupport::VERSION::STRING < "4.0"
|
7
|
+
require 'active_support/tagged_logging'
|
8
|
+
# monkey patch to handle exceptions correctly
|
9
|
+
# not needed for rails 4 as this uses a Formatter to add the tags
|
10
|
+
class ActiveSupport::TaggedLogging
|
11
|
+
def initialize(logger)
|
12
|
+
@logger = logger
|
13
|
+
if logger.is_a?(LogjamAgent::BufferedLogger)
|
14
|
+
self.class.class_eval <<-EVAL, __FILE__, __LINE__ + 1
|
15
|
+
def add(severity, message = nil, progname = nil, &block)
|
16
|
+
@logger.add(severity, message, progname, tags_text, &block)
|
17
|
+
end
|
18
|
+
EVAL
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
6
23
|
else
|
7
24
|
require 'active_support/logger'
|
8
25
|
|
@@ -62,20 +79,22 @@ module LogjamAgent
|
|
62
79
|
end
|
63
80
|
end
|
64
81
|
|
65
|
-
def add(severity, message = nil, progname = nil, &block)
|
82
|
+
def add(severity, message = nil, progname = nil, tags_text = nil, &block)
|
66
83
|
return if level > severity
|
67
84
|
message = progname if message.nil?
|
68
|
-
progname = nil
|
85
|
+
progname = nil
|
86
|
+
message ||= block.call || '' if block
|
69
87
|
request = self.request || Thread.main.thread_variable_get(:logjam_request)
|
70
88
|
if message.is_a?(Exception)
|
71
89
|
request.add_exception(message.class.to_s) if request
|
72
90
|
message = format_exception(message)
|
73
91
|
else
|
74
|
-
message =
|
92
|
+
message = message.to_s
|
75
93
|
if request && severity >= Logger::ERROR && (e = detect_logged_exception(message))
|
76
94
|
request.add_exception(e)
|
77
95
|
end
|
78
96
|
end
|
97
|
+
message = "#{tags_text}#{message}" unless tags_text.blank?
|
79
98
|
time = Time.now
|
80
99
|
formatted_message = formatter.call(severity, time, progname, message)
|
81
100
|
if respond_to?(:buffer)
|
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,103 +1,92 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 7
|
9
|
-
- 1
|
10
|
-
version: 0.7.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Stefan Kaes
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
- 0
|
31
|
-
version: "0"
|
11
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ! '>='
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
32
24
|
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: i18n
|
36
25
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
26
|
+
name: rake
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
46
38
|
type: :development
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: activesupport
|
50
39
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
40
|
+
name: i18n
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
60
52
|
type: :runtime
|
61
|
-
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: uuid4r
|
64
53
|
prerelease: false
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
54
|
+
name: activesupport
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
74
66
|
type: :runtime
|
75
|
-
version_requirements: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: time_bandits
|
78
67
|
prerelease: false
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
68
|
+
name: uuid4r
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ! '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.4'
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0.4'
|
89
80
|
type: :runtime
|
90
|
-
|
81
|
+
prerelease: false
|
82
|
+
name: time_bandits
|
91
83
|
description: Logjam logger and request information forwarding
|
92
|
-
email:
|
84
|
+
email:
|
93
85
|
- stefan.kaes@xing.com
|
94
86
|
executables: []
|
95
|
-
|
96
87
|
extensions: []
|
97
|
-
|
98
88
|
extra_rdoc_files: []
|
99
|
-
|
100
|
-
files:
|
89
|
+
files:
|
101
90
|
- .gitignore
|
102
91
|
- Gemfile
|
103
92
|
- README.rdoc
|
@@ -116,38 +105,27 @@ files:
|
|
116
105
|
- lib/logjam_agent/zmq_forwarder.rb
|
117
106
|
- logjam_agent.gemspec
|
118
107
|
- rails/init.rb
|
119
|
-
homepage:
|
108
|
+
homepage: ''
|
120
109
|
licenses: []
|
121
|
-
|
110
|
+
metadata: {}
|
122
111
|
post_install_message:
|
123
112
|
rdoc_options: []
|
124
|
-
|
125
|
-
require_paths:
|
113
|
+
require_paths:
|
126
114
|
- lib
|
127
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ">="
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
hash: 3
|
142
|
-
segments:
|
143
|
-
- 0
|
144
|
-
version: "0"
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
145
125
|
requirements: []
|
146
|
-
|
147
126
|
rubyforge_project: logjam_agent
|
148
|
-
rubygems_version:
|
127
|
+
rubygems_version: 2.0.5
|
149
128
|
signing_key:
|
150
|
-
specification_version:
|
129
|
+
specification_version: 4
|
151
130
|
summary: Logjam client library to be used with logjam
|
152
131
|
test_files: []
|
153
|
-
|