From c652587446debd91f8463ddadcafa5d24be63934 Mon Sep 17 00:00:00 2001 From: ssube Date: Mon, 30 Dec 2019 18:09:30 -0600 Subject: [PATCH] lint(transform): debug logging for shell tx --- src/transform/ShellTransform.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transform/ShellTransform.ts b/src/transform/ShellTransform.ts index 247e280df..a453fdccb 100644 --- a/src/transform/ShellTransform.ts +++ b/src/transform/ShellTransform.ts @@ -26,6 +26,7 @@ export class ShellTransform extends BaseTransform implements public async transform(entity: FilterValue, type: string, body: TemplateScope): Promise { // execute command and collect stdout + this.logger.debug({ child: this.data.child }, 'executing shell command'); const child = this.exec(this.data.child.command, { timeout: this.data.child.timeout, }); @@ -35,10 +36,12 @@ export class ShellTransform extends BaseTransform implements // turn value into string const value = JSON.stringify(entity); + this.logger.debug({ value }, 'writing value to shell command'); await writeValue(child.stdin, value); // abort on errors const results = await waitForChild(child); + this.logger.debug(results, 'collected results from shell command'); // parse stdout into output scope return JSON.parse(results.stdout);