appsignal 4.3.1 → 4.3.2

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: 72117542e46b8613fd06be0f6073cb824e131ade995b2d22fca7d9f12564face
4
- data.tar.gz: 326804ebc3cd24787261ae0a7f3f8a5f84dd2dad77631dc8f3b5a0465b2e3e3c
3
+ metadata.gz: 42879f53736b4c57af015ffd56698a8e5e7ac1d3add47169067ae464d6fecf57
4
+ data.tar.gz: ef13a0ee3e7c64243d89c48e00bb2ea4a43f43869ad5f33f47690918234cb548
5
5
  SHA512:
6
- metadata.gz: 14df3b30df963b9e5ff2944737fc1b965b3258274b916ee84ccdf56710211baccbb26708ea014db5cb4d41138a05b994266883b6d57879eeec4d3adfadc6506a
7
- data.tar.gz: f7454f83955ecf86ccfaf9ec17562a994f26e32bb38a9c168603f21bc41b7e19d0fff45ef13d1092943244f28710bafefb7f2c64a6efcc73017b5b9f8410ea0c
6
+ metadata.gz: 1a0c12865aea57f0602ca23346deaf74a9cb0e350f45335eb3f8511a14e3e82ab3e17cd57e76bf5b567a0621232b15832cf9c89fb2355195d31db650ed84efd9
7
+ data.tar.gz: e14293ffbec48adfbd1459138e7d71f8bcbbaebc2cde6684c94b7eebd20973cae4069cc1099fc6742783e013dc41643342e9c68c36cf8841f887cfe886bb19da
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 4.3.2
4
+
5
+ _Published on 2024-12-31._
6
+
7
+ ### Fixed
8
+
9
+ - Fix an issue where loggers, when broadcasted to by `Appsignal::Logger#broadcast_to`, would format again messages that have already been formatted by the broadcaster, causing the resulting message emitted by the logger to contain double newlines. (patch [cd2f9fbf](https://github.com/appsignal/appsignal-ruby/commit/cd2f9fbfe31b39de90bc012ddacaaf9b28fef913))
10
+
3
11
  ## 4.3.1
4
12
 
5
13
  _Published on 2024-12-20._
@@ -41,6 +41,14 @@ module Appsignal
41
41
  @loggers = []
42
42
  end
43
43
 
44
+ # When a formatter is set on the logger (e.g. when wrapping the logger in
45
+ # `ActiveSupport::TaggedLogging`) we want to set that formatter on all the
46
+ # loggers that are being broadcasted to.
47
+ def formatter=(formatter)
48
+ super
49
+ @loggers.each { |logger| logger.formatter = formatter }
50
+ end
51
+
44
52
  # We support the various methods in the Ruby
45
53
  # logger class by supplying this method.
46
54
  # @api private
@@ -59,8 +67,6 @@ module Appsignal
59
67
  end
60
68
  return if message.nil?
61
69
 
62
- message = formatter.call(severity, Time.now, group, message) if formatter
63
-
64
70
  @loggers.each do |logger|
65
71
  logger.add(severity, message, group)
66
72
  rescue
@@ -74,6 +80,8 @@ module Appsignal
74
80
  return
75
81
  end
76
82
 
83
+ message = formatter.call(severity, Time.now, group, message) if formatter
84
+
77
85
  Appsignal::Extension.log(
78
86
  group,
79
87
  SEVERITY_MAP.fetch(severity, 0),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "4.3.1"
4
+ VERSION = "4.3.2"
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: 4.3.1
4
+ version: 4.3.2
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: 2024-12-20 00:00:00.000000000 Z
13
+ date: 2024-12-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: logger