We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85b2447 commit dc238e1Copy full SHA for dc238e1
packages/logger/src/formatter/LogFormatter.ts
@@ -116,7 +116,10 @@ abstract class LogFormatter {
116
name,
117
location: this.getCodeLocation(error.stack),
118
message,
119
- stack,
+ stack:
120
+ this.envVarsService?.isDevMode() && typeof stack === 'string'
121
+ ? stack?.split('\n')
122
+ : stack,
123
cause:
124
error.cause instanceof Error
125
? this.formatError(error.cause)
@@ -131,13 +134,6 @@ abstract class LogFormatter {
131
134
}
132
135
133
136
- if (
- this.envVarsService?.isDevMode() &&
- typeof formattedError.stack === 'string'
137
- ) {
138
- formattedError.stack = formattedError.stack.split('\n');
139
- }
140
-
141
return formattedError;
142
143
0 commit comments