appsignal 3.3.5-java → 3.3.6-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +113 -113
- data/CHANGELOG.md +8 -0
- data/build_matrix.yml +19 -19
- data/ext/agent.rb +27 -27
- data/ext/appsignal_extension.c +4 -2
- data/lib/appsignal/logger.rb +12 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/logger_spec.rb +22 -13
- metadata +6 -6
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 3.3.6
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
|
7
|
+
- [962d069c](https://github.com/appsignal/appsignal-ruby/commit/962d069ce46fd7bf404a2ce28343e1f650ce3b37) patch - Bump agent to 8d042e2.
|
8
|
+
|
9
|
+
- Support multiple log formats.
|
10
|
+
|
3
11
|
## 3.3.5
|
4
12
|
|
5
13
|
### Changed
|
data/build_matrix.yml
CHANGED
@@ -199,9 +199,9 @@ matrix:
|
|
199
199
|
gems: "minimal"
|
200
200
|
- ruby: "2.6.9"
|
201
201
|
- ruby: "2.7.7"
|
202
|
-
- ruby: "3.0.
|
203
|
-
- ruby: "3.1.
|
204
|
-
- ruby: "3.2.
|
202
|
+
- ruby: "3.0.5"
|
203
|
+
- ruby: "3.1.3"
|
204
|
+
- ruby: "3.2.1"
|
205
205
|
- ruby: "jruby-9.3.9.0"
|
206
206
|
gems: "minimal"
|
207
207
|
- ruby: "jruby-9.4.0.0"
|
@@ -214,23 +214,23 @@ matrix:
|
|
214
214
|
- gem: "hanami"
|
215
215
|
only:
|
216
216
|
ruby:
|
217
|
-
- "3.0.
|
218
|
-
- "3.1.
|
219
|
-
- "3.2.
|
217
|
+
- "3.0.5"
|
218
|
+
- "3.1.3"
|
219
|
+
- "3.2.1"
|
220
220
|
- gem: "http5"
|
221
221
|
- gem: "padrino"
|
222
222
|
- gem: "psych-3"
|
223
223
|
only:
|
224
224
|
ruby:
|
225
|
-
- "3.0.
|
226
|
-
- "3.1.
|
227
|
-
- "3.2.
|
225
|
+
- "3.0.5"
|
226
|
+
- "3.1.3"
|
227
|
+
- "3.2.1"
|
228
228
|
- gem: "psych-4"
|
229
229
|
only:
|
230
230
|
ruby:
|
231
|
-
- "3.0.
|
232
|
-
- "3.1.
|
233
|
-
- "3.2.
|
231
|
+
- "3.0.5"
|
232
|
+
- "3.1.3"
|
233
|
+
- "3.2.1"
|
234
234
|
- gem: "que"
|
235
235
|
- gem: "que_beta"
|
236
236
|
- gem: "rails-3.2"
|
@@ -293,7 +293,7 @@ matrix:
|
|
293
293
|
- "2.5.8"
|
294
294
|
- "2.6.9"
|
295
295
|
- "2.7.7"
|
296
|
-
- "3.0.
|
296
|
+
- "3.0.5"
|
297
297
|
- "jruby-9.4.0.0"
|
298
298
|
- gem: "rails-6.1"
|
299
299
|
only:
|
@@ -301,17 +301,17 @@ matrix:
|
|
301
301
|
- "2.5.8"
|
302
302
|
- "2.6.9"
|
303
303
|
- "2.7.7"
|
304
|
-
- "3.0.
|
305
|
-
- "3.1.
|
306
|
-
- "3.2.
|
304
|
+
- "3.0.5"
|
305
|
+
- "3.1.3"
|
306
|
+
- "3.2.1"
|
307
307
|
- "jruby-9.4.0.0"
|
308
308
|
- gem: "rails-7.0"
|
309
309
|
only:
|
310
310
|
ruby:
|
311
311
|
- "2.7.7"
|
312
|
-
- "3.0.
|
313
|
-
- "3.1.
|
314
|
-
- "3.2.
|
312
|
+
- "3.0.5"
|
313
|
+
- "3.1.3"
|
314
|
+
- "3.2.1"
|
315
315
|
- "jruby-9.4.0.0"
|
316
316
|
- gem: "resque-1"
|
317
317
|
bundler: "1.17.3"
|
data/ext/agent.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Modifications to this file will be overwritten with the next agent release.
|
5
5
|
|
6
6
|
APPSIGNAL_AGENT_CONFIG = {
|
7
|
-
"version" => "
|
7
|
+
"version" => "8d042e2",
|
8
8
|
"mirrors" => [
|
9
9
|
"https://appsignal-agent-releases.global.ssl.fastly.net",
|
10
10
|
"https://d135dj0rjqvssy.cloudfront.net"
|
@@ -12,131 +12,131 @@ APPSIGNAL_AGENT_CONFIG = {
|
|
12
12
|
"triples" => {
|
13
13
|
"x86_64-darwin" => {
|
14
14
|
"static" => {
|
15
|
-
"checksum" => "
|
15
|
+
"checksum" => "e0142859f35e31b52dcc57418636c05bcb21940ad499bbe255f90a1cf7359bf7",
|
16
16
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
17
17
|
},
|
18
18
|
"dynamic" => {
|
19
|
-
"checksum" => "
|
19
|
+
"checksum" => "43b01ab821eddb9fda03cedf59ab4bd8ebfca4c0cf011daa0233802fff69fc0b",
|
20
20
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
21
21
|
}
|
22
22
|
},
|
23
23
|
"universal-darwin" => {
|
24
24
|
"static" => {
|
25
|
-
"checksum" => "
|
25
|
+
"checksum" => "e0142859f35e31b52dcc57418636c05bcb21940ad499bbe255f90a1cf7359bf7",
|
26
26
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
27
27
|
},
|
28
28
|
"dynamic" => {
|
29
|
-
"checksum" => "
|
29
|
+
"checksum" => "43b01ab821eddb9fda03cedf59ab4bd8ebfca4c0cf011daa0233802fff69fc0b",
|
30
30
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
31
31
|
}
|
32
32
|
},
|
33
33
|
"aarch64-darwin" => {
|
34
34
|
"static" => {
|
35
|
-
"checksum" => "
|
35
|
+
"checksum" => "5a1ab02452497b29222d580f3e9d3649eb547b8c90338858462d4f221dd18ff9",
|
36
36
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
37
37
|
},
|
38
38
|
"dynamic" => {
|
39
|
-
"checksum" => "
|
39
|
+
"checksum" => "ea6ee98125ae521f3a79c47d942cf9b689a43e48fd172eab62d3dc80a7fea033",
|
40
40
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
41
41
|
}
|
42
42
|
},
|
43
43
|
"arm64-darwin" => {
|
44
44
|
"static" => {
|
45
|
-
"checksum" => "
|
45
|
+
"checksum" => "5a1ab02452497b29222d580f3e9d3649eb547b8c90338858462d4f221dd18ff9",
|
46
46
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
47
47
|
},
|
48
48
|
"dynamic" => {
|
49
|
-
"checksum" => "
|
49
|
+
"checksum" => "ea6ee98125ae521f3a79c47d942cf9b689a43e48fd172eab62d3dc80a7fea033",
|
50
50
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
51
51
|
}
|
52
52
|
},
|
53
53
|
"arm-darwin" => {
|
54
54
|
"static" => {
|
55
|
-
"checksum" => "
|
55
|
+
"checksum" => "5a1ab02452497b29222d580f3e9d3649eb547b8c90338858462d4f221dd18ff9",
|
56
56
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
57
57
|
},
|
58
58
|
"dynamic" => {
|
59
|
-
"checksum" => "
|
59
|
+
"checksum" => "ea6ee98125ae521f3a79c47d942cf9b689a43e48fd172eab62d3dc80a7fea033",
|
60
60
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
61
61
|
}
|
62
62
|
},
|
63
63
|
"aarch64-linux" => {
|
64
64
|
"static" => {
|
65
|
-
"checksum" => "
|
65
|
+
"checksum" => "0e85a0a13b9457c4ee1f316e92e8d95de9125bbaff90ceb826bcefaaffa413d9",
|
66
66
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
67
67
|
},
|
68
68
|
"dynamic" => {
|
69
|
-
"checksum" => "
|
69
|
+
"checksum" => "77103ab5c9907334998c48464fd742ab21fcbead58195cb6afcfc4797514f34c",
|
70
70
|
"filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
|
71
71
|
}
|
72
72
|
},
|
73
73
|
"i686-linux" => {
|
74
74
|
"static" => {
|
75
|
-
"checksum" => "
|
75
|
+
"checksum" => "0e8a0490ca960bb8e57183156ed4999afbd70cf13c640fe96f9b0e25556075f1",
|
76
76
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
77
77
|
},
|
78
78
|
"dynamic" => {
|
79
|
-
"checksum" => "
|
79
|
+
"checksum" => "f19947288f3638f15eeaf8f6ee9aecae6f1f777e4e68820c88bf4fb6941856b9",
|
80
80
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
81
81
|
}
|
82
82
|
},
|
83
83
|
"x86-linux" => {
|
84
84
|
"static" => {
|
85
|
-
"checksum" => "
|
85
|
+
"checksum" => "0e8a0490ca960bb8e57183156ed4999afbd70cf13c640fe96f9b0e25556075f1",
|
86
86
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
87
87
|
},
|
88
88
|
"dynamic" => {
|
89
|
-
"checksum" => "
|
89
|
+
"checksum" => "f19947288f3638f15eeaf8f6ee9aecae6f1f777e4e68820c88bf4fb6941856b9",
|
90
90
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
91
91
|
}
|
92
92
|
},
|
93
93
|
"x86_64-linux" => {
|
94
94
|
"static" => {
|
95
|
-
"checksum" => "
|
95
|
+
"checksum" => "4eec193edeae76e0793789846112ac9127870c90a8ae6e47aa2a8490163733aa",
|
96
96
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
97
97
|
},
|
98
98
|
"dynamic" => {
|
99
|
-
"checksum" => "
|
99
|
+
"checksum" => "dcbc99ba30038f03f91232e5a25d76f27fae1a85a1b692e4935c62720e60b4ae",
|
100
100
|
"filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
|
101
101
|
}
|
102
102
|
},
|
103
103
|
"x86_64-linux-musl" => {
|
104
104
|
"static" => {
|
105
|
-
"checksum" => "
|
105
|
+
"checksum" => "d91d1ed6e775cc00319fca0a4144dff064d31fb6a8a28dbb5027add44e4dab02",
|
106
106
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
107
107
|
},
|
108
108
|
"dynamic" => {
|
109
|
-
"checksum" => "
|
109
|
+
"checksum" => "87a704506c488a9f6fd582b2191085af9dc3c1ffb10eaa8586691474fc42f595",
|
110
110
|
"filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
|
111
111
|
}
|
112
112
|
},
|
113
113
|
"aarch64-linux-musl" => {
|
114
114
|
"static" => {
|
115
|
-
"checksum" => "
|
115
|
+
"checksum" => "0ff6702bd976871f610f39ff6c2dd73c4535b12c15c81c0d0afab7650e75922d",
|
116
116
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
117
117
|
},
|
118
118
|
"dynamic" => {
|
119
|
-
"checksum" => "
|
119
|
+
"checksum" => "516656660666791a5158765fdc8181f12c2c08763f257740c6e04d97cdcdb6c2",
|
120
120
|
"filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
|
121
121
|
}
|
122
122
|
},
|
123
123
|
"x86_64-freebsd" => {
|
124
124
|
"static" => {
|
125
|
-
"checksum" => "
|
125
|
+
"checksum" => "d973edc7f13cdad2993c415f17a680a4de3288ce57fc5ae0c69ef3a1ccbb2856",
|
126
126
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
127
127
|
},
|
128
128
|
"dynamic" => {
|
129
|
-
"checksum" => "
|
129
|
+
"checksum" => "6720b701bb41257c4fcdb189c7196241c5e43a0a0f20f1614a1a8978e117f5c9",
|
130
130
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
131
131
|
}
|
132
132
|
},
|
133
133
|
"amd64-freebsd" => {
|
134
134
|
"static" => {
|
135
|
-
"checksum" => "
|
135
|
+
"checksum" => "d973edc7f13cdad2993c415f17a680a4de3288ce57fc5ae0c69ef3a1ccbb2856",
|
136
136
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
137
137
|
},
|
138
138
|
"dynamic" => {
|
139
|
-
"checksum" => "
|
139
|
+
"checksum" => "6720b701bb41257c4fcdb189c7196241c5e43a0a0f20f1614a1a8978e117f5c9",
|
140
140
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
141
141
|
}
|
142
142
|
}
|
data/ext/appsignal_extension.c
CHANGED
@@ -720,11 +720,12 @@ static VALUE close_span(VALUE self) {
|
|
720
720
|
return Qnil;
|
721
721
|
}
|
722
722
|
|
723
|
-
static VALUE a_log(VALUE self, VALUE group, VALUE severity, VALUE message, VALUE attributes) {
|
723
|
+
static VALUE a_log(VALUE self, VALUE group, VALUE severity, VALUE format, VALUE message, VALUE attributes) {
|
724
724
|
appsignal_data_t* attributes_data;
|
725
725
|
|
726
726
|
Check_Type(group, T_STRING);
|
727
727
|
Check_Type(severity, T_FIXNUM);
|
728
|
+
Check_Type(format, T_FIXNUM);
|
728
729
|
Check_Type(message, T_STRING);
|
729
730
|
Check_Type(attributes, RUBY_T_DATA);
|
730
731
|
|
@@ -733,6 +734,7 @@ static VALUE a_log(VALUE self, VALUE group, VALUE severity, VALUE message, VALUE
|
|
733
734
|
appsignal_log(
|
734
735
|
make_appsignal_string(group),
|
735
736
|
FIX2INT(severity),
|
737
|
+
FIX2INT(format),
|
736
738
|
make_appsignal_string(message),
|
737
739
|
attributes_data
|
738
740
|
);
|
@@ -859,7 +861,7 @@ void Init_appsignal_extension(void) {
|
|
859
861
|
// Diagnostics
|
860
862
|
rb_define_singleton_method(Extension, "diagnose", diagnose, 0);
|
861
863
|
// Logging
|
862
|
-
rb_define_singleton_method(Extension, "log", a_log,
|
864
|
+
rb_define_singleton_method(Extension, "log", a_log, 5);
|
863
865
|
|
864
866
|
// Server state
|
865
867
|
rb_define_singleton_method(Extension, "get_server_state", get_server_state, 1);
|
data/lib/appsignal/logger.rb
CHANGED
@@ -6,15 +6,20 @@ require "set"
|
|
6
6
|
module Appsignal
|
7
7
|
# Logger that flushes logs to the AppSignal logging service
|
8
8
|
class Logger < ::Logger # rubocop:disable Metrics/ClassLength
|
9
|
+
PLAINTEXT = 0
|
10
|
+
LOGFMT = 1
|
11
|
+
JSON = 2
|
12
|
+
|
9
13
|
# Create a new logger instance
|
10
14
|
#
|
11
15
|
# @param group Name of the group for this logger.
|
12
16
|
# @param level Log level to filter with
|
13
17
|
# @return [void]
|
14
|
-
def initialize(group, level
|
18
|
+
def initialize(group, level: INFO, format: PLAINTEXT)
|
15
19
|
raise TypeError, "group must be a string" unless group.is_a? String
|
16
20
|
@group = group
|
17
21
|
@level = level
|
22
|
+
@format = format
|
18
23
|
end
|
19
24
|
|
20
25
|
# We support the various methods in the Ruby
|
@@ -51,6 +56,7 @@ module Appsignal
|
|
51
56
|
Appsignal::Extension.log(
|
52
57
|
group,
|
53
58
|
severity_number,
|
59
|
+
@format,
|
54
60
|
message,
|
55
61
|
Appsignal::Utils::Data.generate({})
|
56
62
|
)
|
@@ -69,6 +75,7 @@ module Appsignal
|
|
69
75
|
Appsignal::Extension.log(
|
70
76
|
@group,
|
71
77
|
2,
|
78
|
+
@format,
|
72
79
|
message,
|
73
80
|
Appsignal::Utils::Data.generate(attributes)
|
74
81
|
)
|
@@ -86,6 +93,7 @@ module Appsignal
|
|
86
93
|
Appsignal::Extension.log(
|
87
94
|
@group,
|
88
95
|
3,
|
96
|
+
@format,
|
89
97
|
message,
|
90
98
|
Appsignal::Utils::Data.generate(attributes)
|
91
99
|
)
|
@@ -103,6 +111,7 @@ module Appsignal
|
|
103
111
|
Appsignal::Extension.log(
|
104
112
|
@group,
|
105
113
|
5,
|
114
|
+
@format,
|
106
115
|
message,
|
107
116
|
Appsignal::Utils::Data.generate(attributes)
|
108
117
|
)
|
@@ -120,6 +129,7 @@ module Appsignal
|
|
120
129
|
Appsignal::Extension.log(
|
121
130
|
@group,
|
122
131
|
6,
|
132
|
+
@format,
|
123
133
|
message,
|
124
134
|
Appsignal::Utils::Data.generate(attributes)
|
125
135
|
)
|
@@ -137,6 +147,7 @@ module Appsignal
|
|
137
147
|
Appsignal::Extension.log(
|
138
148
|
@group,
|
139
149
|
7,
|
150
|
+
@format,
|
140
151
|
message,
|
141
152
|
Appsignal::Utils::Data.generate(attributes)
|
142
153
|
)
|
data/lib/appsignal/version.rb
CHANGED
@@ -1,23 +1,22 @@
|
|
1
1
|
describe Appsignal::Logger do
|
2
|
-
let(:
|
3
|
-
let(:logger) { Appsignal::Logger.new("group", level) }
|
2
|
+
let(:logger) { Appsignal::Logger.new("group", :level => ::Logger::DEBUG) }
|
4
3
|
|
5
4
|
it "should not create a logger with a nil group" do
|
6
5
|
expect do
|
7
|
-
Appsignal::Logger.new(nil
|
6
|
+
Appsignal::Logger.new(nil)
|
8
7
|
end.to raise_error(TypeError)
|
9
8
|
end
|
10
9
|
|
11
10
|
describe "#add" do
|
12
11
|
it "should log with a level and message" do
|
13
12
|
expect(Appsignal::Extension).to receive(:log)
|
14
|
-
.with("group", 3, "Log message", instance_of(Appsignal::Extension::Data))
|
13
|
+
.with("group", 3, 0, "Log message", instance_of(Appsignal::Extension::Data))
|
15
14
|
logger.add(::Logger::INFO, "Log message")
|
16
15
|
end
|
17
16
|
|
18
17
|
it "should log with a block" do
|
19
18
|
expect(Appsignal::Extension).to receive(:log)
|
20
|
-
.with("group", 3, "Log message", instance_of(Appsignal::Extension::Data))
|
19
|
+
.with("group", 3, 0, "Log message", instance_of(Appsignal::Extension::Data))
|
21
20
|
logger.add(::Logger::INFO) do
|
22
21
|
"Log message"
|
23
22
|
end
|
@@ -25,7 +24,7 @@ describe Appsignal::Logger do
|
|
25
24
|
|
26
25
|
it "should log with a level, message and group" do
|
27
26
|
expect(Appsignal::Extension).to receive(:log)
|
28
|
-
.with("other_group", 3, "Log message", instance_of(Appsignal::Extension::Data))
|
27
|
+
.with("other_group", 3, 0, "Log message", instance_of(Appsignal::Extension::Data))
|
29
28
|
logger.add(::Logger::INFO, "Log message", "other_group")
|
30
29
|
end
|
31
30
|
|
@@ -34,8 +33,8 @@ describe Appsignal::Logger do
|
|
34
33
|
logger.add(::Logger::INFO, nil)
|
35
34
|
end
|
36
35
|
|
37
|
-
context "with
|
38
|
-
let(:
|
36
|
+
context "with info log level" do
|
37
|
+
let(:logger) { Appsignal::Logger.new("group", :level => ::Logger::INFO) }
|
39
38
|
|
40
39
|
it "should skip logging if the level is too low" do
|
41
40
|
expect(Appsignal::Extension).not_to receive(:log)
|
@@ -43,6 +42,16 @@ describe Appsignal::Logger do
|
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
45
|
+
context "with a format set" do
|
46
|
+
let(:logger) { Appsignal::Logger.new("group", :format => Appsignal::Logger::LOGFMT) }
|
47
|
+
|
48
|
+
it "should log and pass the format flag" do
|
49
|
+
expect(Appsignal::Extension).to receive(:log)
|
50
|
+
.with("group", 3, 1, "Log message", instance_of(Appsignal::Extension::Data))
|
51
|
+
logger.add(::Logger::INFO, "Log message")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
46
55
|
context "with a formatter set" do
|
47
56
|
before do
|
48
57
|
logger.formatter = proc do |_level, _timestamp, _appname, message|
|
@@ -52,7 +61,7 @@ describe Appsignal::Logger do
|
|
52
61
|
|
53
62
|
it "should log with a level, message and group" do
|
54
63
|
expect(Appsignal::Extension).to receive(:log)
|
55
|
-
.with("other_group", 3, "formatted: 'Log message'", instance_of(Appsignal::Extension::Data))
|
64
|
+
.with("other_group", 3, 0, "formatted: 'Log message'", instance_of(Appsignal::Extension::Data))
|
56
65
|
logger.add(::Logger::INFO, "Log message", "other_group")
|
57
66
|
end
|
58
67
|
end
|
@@ -71,7 +80,7 @@ describe Appsignal::Logger do
|
|
71
80
|
.with({})
|
72
81
|
.and_call_original
|
73
82
|
expect(Appsignal::Extension).to receive(:log)
|
74
|
-
.with("group", method[1], "Log message", instance_of(Appsignal::Extension::Data))
|
83
|
+
.with("group", method[1], 0, "Log message", instance_of(Appsignal::Extension::Data))
|
75
84
|
|
76
85
|
logger.send(method[0], "Log message")
|
77
86
|
end
|
@@ -81,7 +90,7 @@ describe Appsignal::Logger do
|
|
81
90
|
.with({})
|
82
91
|
.and_call_original
|
83
92
|
expect(Appsignal::Extension).to receive(:log)
|
84
|
-
.with("group", method[1], "Log message", instance_of(Appsignal::Extension::Data))
|
93
|
+
.with("group", method[1], 0, "Log message", instance_of(Appsignal::Extension::Data))
|
85
94
|
|
86
95
|
logger.send(method[0]) do
|
87
96
|
"Log message"
|
@@ -95,7 +104,7 @@ describe Appsignal::Logger do
|
|
95
104
|
|
96
105
|
if method[2]
|
97
106
|
context "with a lower log level" do
|
98
|
-
let(:
|
107
|
+
let(:logger) { Appsignal::Logger.new("group", :level => method[2]) }
|
99
108
|
|
100
109
|
it "should skip logging if the level is too low" do
|
101
110
|
expect(Appsignal::Extension).not_to receive(:log)
|
@@ -113,7 +122,7 @@ describe Appsignal::Logger do
|
|
113
122
|
|
114
123
|
it "should log with a level, message and group" do
|
115
124
|
expect(Appsignal::Extension).to receive(:log)
|
116
|
-
.with("group", method[1], "formatted: 'Log message'", instance_of(Appsignal::Extension::Data))
|
125
|
+
.with("group", method[1], 0, "formatted: 'Log message'", instance_of(Appsignal::Extension::Data))
|
117
126
|
logger.send(method[0], "Log message")
|
118
127
|
end
|
119
128
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.6
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
8
8
|
- Thijs Cadier
|
9
9
|
- Tom de Bruijn
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-02-
|
13
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -436,7 +436,7 @@ metadata:
|
|
436
436
|
documentation_uri: https://docs.appsignal.com/ruby/
|
437
437
|
homepage_uri: https://docs.appsignal.com/ruby/
|
438
438
|
source_code_uri: https://github.com/appsignal/appsignal-ruby
|
439
|
-
post_install_message:
|
439
|
+
post_install_message:
|
440
440
|
rdoc_options: []
|
441
441
|
require_paths:
|
442
442
|
- lib
|
@@ -452,8 +452,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
452
452
|
- !ruby/object:Gem::Version
|
453
453
|
version: '0'
|
454
454
|
requirements: []
|
455
|
-
rubygems_version: 3.
|
456
|
-
signing_key:
|
455
|
+
rubygems_version: 3.1.6
|
456
|
+
signing_key:
|
457
457
|
specification_version: 4
|
458
458
|
summary: Logs performance and exception data from your app to appsignal.com
|
459
459
|
test_files:
|