sasai-common-utils 1.0.52 → 1.0.53

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasai-common-utils",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "Reusable utility library for common logging and other shared features.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -160,11 +160,17 @@ function emitLog(level, data) {
160
160
 
161
161
  const { trace, span, parentSpan, message, ...rest } = data;
162
162
 
163
+ const finalMessage =
164
+ typeof message === "string" && message.trim()
165
+ ? cleanString(message)
166
+ : "Application log";
167
+
163
168
  pinoLogger[level]({
164
169
  trace_id: trace || undefined,
165
170
  span_id: span || undefined,
166
171
  parent_span_id: parentSpan || undefined,
167
- message: cleanString(message || ""),
172
+ body: finalMessage,
173
+ message: finalMessage,
168
174
  ...rest,
169
175
  });
170
176
  }