appsignal 3.3.9 → 3.3.10

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
  SHA256:
3
- metadata.gz: 762febba3d00911209c9fd4d6d7c1f55aa89ad38437df3da0fa5b36a00008c7b
4
- data.tar.gz: 5cccb7e02b50707e3093025679cd48168379ed2300d855e851eb71d62095f4ff
3
+ metadata.gz: 8c9874bccdd354c6e24e792c5b82a69945bd4de15fb02487ddf756056e18cc6e
4
+ data.tar.gz: 6ba55a31bc34628318fe11965d60a45b5c5c7341b1a5c6f32fa43a672c4c58e5
5
5
  SHA512:
6
- metadata.gz: eb3286752fa4a191175612ebb66ea1c8333c29ac74548d510a857aa1bce668d678a255bc995ac979e3f5fff424e9f39fb3883c0e9a835a496b15416b1d3efd5a
7
- data.tar.gz: bb15b922ac0460bd0d58d7c5dcf50e95665be21bfc35af5d1a2d8ca400f78c2857fcc0d78f806568927607f55edffc5891c7b536c0554e48abbf90b41a7cc5fd
6
+ metadata.gz: d218ecd29bce1e8ae677ef4fbd7cf26f1c42d5967507cfe5fbadf209084c39d56bc0cb4198ac5d38bd59e29915c652648d3c867d73d3bd56b164781f29cd1d3f
7
+ data.tar.gz: fe25c533a5059981d22985bfa46ad8df4be7fbb2e25abde329b6cdba38feb8f7cf2099915db14a86cacc8461b8ce2e070492360d4f4ac89e60bd3f1b7bb817ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.3.10
4
+
5
+ ### Fixed
6
+
7
+ - [48389475](https://github.com/appsignal/appsignal-ruby/commit/48389475f7739f5688e0251902227404e5f93b96) patch - The `Appsignal::Logger` is now compatible with `ActiveSupport::Logger.broadcast`.
8
+
3
9
  ## 3.3.9
4
10
 
5
11
  ### Fixed
@@ -5,7 +5,7 @@ require "set"
5
5
 
6
6
  module Appsignal
7
7
  # Logger that flushes logs to the AppSignal logging service
8
- class Logger < ::Logger # rubocop:disable Metrics/ClassLength
8
+ class Logger < ::Logger
9
9
  PLAINTEXT = 0
10
10
  LOGFMT = 1
11
11
  JSON = 2
@@ -32,7 +32,7 @@ module Appsignal
32
32
  # We support the various methods in the Ruby
33
33
  # logger class by supplying this method.
34
34
  # @api private
35
- def add(severity, message = nil, group = nil)
35
+ def add(severity, message = nil, group = nil, attributes = {})
36
36
  severity ||= UNKNOWN
37
37
  return true if severity < level
38
38
  group = @group if group.nil?
@@ -52,7 +52,7 @@ module Appsignal
52
52
  SEVERITY_MAP.fetch(severity, 0),
53
53
  @format,
54
54
  message,
55
- Appsignal::Utils::Data.generate({})
55
+ Appsignal::Utils::Data.generate(attributes)
56
56
  )
57
57
  end
58
58
  alias log add
@@ -65,14 +65,7 @@ module Appsignal
65
65
  return if DEBUG < level
66
66
  message = yield if message.nil? && block_given?
67
67
  return if message.nil?
68
- message = formatter.call(DEBUG, Time.now, @group, message) if formatter
69
- Appsignal::Extension.log(
70
- @group,
71
- 2,
72
- @format,
73
- message,
74
- Appsignal::Utils::Data.generate(attributes)
75
- )
68
+ add(DEBUG, message, @group, attributes)
76
69
  end
77
70
 
78
71
  # Log an info level message
@@ -83,14 +76,7 @@ module Appsignal
83
76
  return if INFO < level
84
77
  message = yield if message.nil? && block_given?
85
78
  return if message.nil?
86
- message = formatter.call(INFO, Time.now, @group, message) if formatter
87
- Appsignal::Extension.log(
88
- @group,
89
- 3,
90
- @format,
91
- message,
92
- Appsignal::Utils::Data.generate(attributes)
93
- )
79
+ add(INFO, message, @group, attributes)
94
80
  end
95
81
 
96
82
  # Log a warn level message
@@ -101,14 +87,7 @@ module Appsignal
101
87
  return if WARN < level
102
88
  message = yield if message.nil? && block_given?
103
89
  return if message.nil?
104
- message = formatter.call(WARN, Time.now, @group, message) if formatter
105
- Appsignal::Extension.log(
106
- @group,
107
- 5,
108
- @format,
109
- message,
110
- Appsignal::Utils::Data.generate(attributes)
111
- )
90
+ add(WARN, message, @group, attributes)
112
91
  end
113
92
 
114
93
  # Log an error level message
@@ -119,14 +98,7 @@ module Appsignal
119
98
  return if ERROR < level
120
99
  message = yield if message.nil? && block_given?
121
100
  return if message.nil?
122
- message = formatter.call(ERROR, Time.now, @group, message) if formatter
123
- Appsignal::Extension.log(
124
- @group,
125
- 6,
126
- @format,
127
- message,
128
- Appsignal::Utils::Data.generate(attributes)
129
- )
101
+ add(ERROR, message, @group, attributes)
130
102
  end
131
103
 
132
104
  # Log a fatal level message
@@ -137,14 +109,7 @@ module Appsignal
137
109
  return if FATAL < level
138
110
  message = yield if message.nil? && block_given?
139
111
  return if message.nil?
140
- message = formatter.call(FATAL, Time.now, @group, message) if formatter
141
- Appsignal::Extension.log(
142
- @group,
143
- 7,
144
- @format,
145
- message,
146
- Appsignal::Utils::Data.generate(attributes)
147
- )
112
+ add(FATAL, message, @group, attributes)
148
113
  end
149
114
  end
150
115
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.3.9".freeze
4
+ VERSION = "3.3.10".freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.9
4
+ version: 3.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-03-31 00:00:00.000000000 Z
13
+ date: 2023-04-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack