Skip to content

Commit ba9518d

Browse files
authored
Improve bundle logs (#1475)
## Changes - Don't log stderr twice in the case of errors - Log correct bundle action in the case of errors ## Tests <!-- How is this tested? -->
1 parent 7b962ff commit ba9518d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/databricks-vscode/src/cli/CliWrapper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ export async function waitForProcess(
176176
if (code === 0) {
177177
resolve();
178178
} else {
179-
reject(new ProcessError(stderr.join(""), code));
179+
const message = onStdError ? "" : stderr.join("");
180+
reject(new ProcessError(message, code));
180181
}
181182
});
182183
p.on("error", (e) => new ProcessError(e.message, null));

packages/databricks-vscode/src/logger/LoggerManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ export class LoggerManager {
128128
format((info) => info.level === level && info)(),
129129
format.timestamp(),
130130
format.printf((info) => {
131-
return `${info.bundleOpName}: ${info.message}`;
131+
const name =
132+
info.bundleOpName ?? info.error?.bundleOpName;
133+
return `${name}: ${info.message}`;
132134
})
133135
),
134136
level,

0 commit comments

Comments
 (0)