logstruct 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01556306744df98d8548bd788dbaee74c29c976207289e7da9da69b7d5e443ca
4
- data.tar.gz: 2f8d6b1becb62c66b139ca071871beccafb35d42396e7fc552b8ba4401a93363
3
+ metadata.gz: 8c4d4cfd390add0e52e9b28655c1aa19c763bf4ad90fa3095be971c165ec7b11
4
+ data.tar.gz: 5af9d7d63a6164375776713c7be932bd08b2ca293ffae376f5aa02b0bb5bd893
5
5
  SHA512:
6
- metadata.gz: c4f6d5ad7c72bf84e59fcb97ecb70fd3829ff6b681c923104e821e817d085ccad33e7b489232ea86a2e02bfff64ff06be6d314e8dbdf0e01ae82c7c26189c361
7
- data.tar.gz: d69f5b0bb706273f5096503f12b7b05519fae03f4ff8d3664794e89c1a6929f42b82dcf5798e782b317f18985ad85067e1c144f1b3739e54876eca163c2ad9bf
6
+ metadata.gz: 17c8c35d01c327c5575a647a1469cfd1bf458073e39c6b6e85fee77ebf58a6f17095a41c607136b2c80e83ccd9ee88c830ef75b50fb71e145f7da410a8a885ea
7
+ data.tar.gz: 2f155268ef7c8877465b18f38f39d0ccbbe0b6357285034866f6558bcf47520d5555121018407cc0f369643c2bec42d7e555ff6f8d3032c1f64c26270081c54e
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ### Changed
9
9
 
10
+ ## [0.1.5] - 2025-11-30
11
+
12
+ - **Fix**: Development logs no longer wrapped in `{message: "..."}` when LogStruct is disabled
13
+ - The TaggedLogging formatter monkey patch now checks `LogStruct.enabled?` before modifying log messages
14
+ - This preserves original Rails logging behavior in development mode
15
+
10
16
  ## [0.1.4] - 2025-10-13
11
17
 
12
18
  - Improve rack spoof handling and split integration setup
@@ -27,8 +27,15 @@ module ActiveSupport
27
27
  # plain strings in a Hash under a `msg` key.
28
28
  # The data is then passed to our custom log formatter that transforms it
29
29
  # into a JSON string before logging.
30
+ #
31
+ # IMPORTANT: This only applies when LogStruct is enabled. When disabled,
32
+ # we preserve the original Rails logging behavior to avoid wrapping
33
+ # messages in hashes (which would break default Rails log formatting).
30
34
  sig { params(severity: T.any(String, Symbol), time: Time, progname: T.untyped, data: T.untyped).returns(String) }
31
35
  def call(severity, time, progname, data)
36
+ # Skip hash wrapping when LogStruct is disabled to preserve default Rails behavior
37
+ return super unless ::LogStruct.enabled?
38
+
32
39
  # Convert data to a hash if it's not already one
33
40
  data = {message: data.to_s} unless data.is_a?(Hash)
34
41
 
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module LogStruct
5
- VERSION = "0.1.4"
5
+ VERSION = "0.1.5"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - DocSpring