We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
lodash.merge
1 parent 4f3967f commit c743eb0Copy full SHA for c743eb0
packages/logger/src/formatter/PowertoolsLogFormatter.ts
@@ -1,3 +1,4 @@
1
+import merge from 'lodash.merge';
2
import type { LogAttributes, PowertoolsLog } from '../types/Log.js';
3
import type { UnformattedAttributes } from '../types/Logger.js';
4
import { LogFormatter } from './LogFormatter.js';
@@ -48,10 +49,7 @@ class PowertoolsLogFormatter extends LogFormatter {
48
49
50
// Merge the ordered attributes with the rest of the attributes
51
const powertoolsLogItem = new LogItem({
- attributes: {
52
- ...orderedAttributes,
53
- ...baseAttributes,
54
- },
+ attributes: merge(orderedAttributes, baseAttributes),
55
});
56
57
powertoolsLogItem.addAttributes(additionalLogAttributes);
0 commit comments