gptscript icon indicating copy to clipboard operation
gptscript copied to clipboard

logs are not printed when stdout is piped

Open solodov opened this issue 1 year ago • 2 comments

Logging doesn't seem to be handled according to expectations, here are couple of examples.

No redirection:

$ echo is this on | gptscript -
12:50:41 started  [main]
12:50:41 sent     [main]
12:50:41 ended    [main] [output=Yes, this is on.]

OUTPUT:

Yes, this is on.
$

Now with output redirected:

$ echo is this on | gptscript - > out
$

The second example only redirected stdout, the expectation is logs would still be sent to stderr and shown on the screen.

solodov avatar Jun 11 '24 17:06 solodov

Related issue - https://github.com/gptscript-ai/gptscript/issues/196

sangee2004 avatar Jun 11 '24 22:06 sangee2004

@solodov sorry for the delay and thanks for reporting this!

Just wanted to explicitly confirm that we can reproduce the issue with the steps you've outlined and let you know that it's in our queue.

njhale avatar Jul 09 '24 05:07 njhale