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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c4d4cfd390add0e52e9b28655c1aa19c763bf4ad90fa3095be971c165ec7b11
|
|
4
|
+
data.tar.gz: 5af9d7d63a6164375776713c7be932bd08b2ca293ffae376f5aa02b0bb5bd893
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
data/lib/log_struct/version.rb
CHANGED