Skip to content

Commit

Permalink
lib: Add debug logging for cockpit.spawn() arguments
Browse files Browse the repository at this point in the history
Without this, `window.debugging = "spawn"` is very disappointing.
Show what processes get launched, so that logging their
outputs/exit codes actually makes sense.
  • Loading branch information
martinpitt authored and jelly committed Nov 6, 2023
1 parent 5bf378f commit 6ac3872
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/lib/cockpit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2741,6 +2741,8 @@ function factory() {
if (options !== undefined)
Object.assign(args, options);

spawn_debug("process spawn:", JSON.stringify(args.spawn));

const name = args.spawn[0] || "process";
const channel = cockpit.channel(args);

Expand Down

0 comments on commit 6ac3872

Please sign in to comment.