We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2f9e39 commit 8dc26b5Copy full SHA for 8dc26b5
lib/semantic_logger/formatters/loki.rb
@@ -137,14 +137,20 @@ def exception
137
end
138
139
def stringify_hash(hash)
140
- hash.stringify_keys.transform_values do |value|
141
- case value
142
- when Hash
143
- stringify_hash(value).to_json
144
- else
145
- value.to_s
146
- end
+ result = {}
+
+ hash.each do |key, value|
+ string_key = key.to_s
+ result[string_key] = case value
+ when Hash
147
+ JSON.generate(stringify_hash(value))
148
+ else
149
+ value.to_s
150
+ end
151
152
153
+ result
154
155
156
0 commit comments