How do i disable the terminal control characters in the k6 output?

Title says it all: how do i disable the terminal control characters in the k6 output?
I tried setting TERM=dumb but that didn’t do it.

Hi,

currently there’s no option to override this behavior and k6 doesn’t inspect the value of TERM :slightly_frowning_face:, but it instead tries to determine if it’s running in a TTY or not. This is done so that it can have a sane default in CI environments. So if you pipe its output to cat it will run without outputting terminal control characters. E.g. k6 run script.js | cat.

FYI unfortunately piping to cat doesn’t seem to do anything for console.log output; i still see garbage like:

^[[36mINFO^[[0m[0001] read 1001 rows from /tmp/testmrns_di.csv ^[[36msource^[[0m=console^[[0K

@mda I think you need to also redirect the stderr to stdout as in k6 run script.js 2>&1 | cat