grafana / k6-docs

The k6 documentation website.
https://grafana.com/docs/k6/latest/
83 stars 208 forks source link

Improve clarity around logs behaviour in k6 #877

Open yorugac opened 1 year ago

yorugac commented 1 year ago

k6 has a bit unusual approach to the logs it prints in CLI output by default. Logs of all levels are written to stderr, unless --log-output option is used. With that option, logs of all levels are re-directed to the specified location. There is no difference in the logs behaviour by levels (INFO vs ERROR vs WARNING).

From the user's perspective, it appears as if this approach was taken to distinguish between test run process messages and summary in stdout and logs in stderr. This is a bit unusual from the perspective of CLI tooling, and it'd be useful for some use cases to be explicit about these details in the docs.

MattDodsonEnglish commented 1 year ago

:+1: It'd be good to get more logs about docs. Now the only info is in the reference for a few scattered options.

Now that we have a new sidebar section called "Results output", I think it'd be pretty sensible to put a new page or collection of pages called Logs there.

ppcano commented 1 year ago

Relates to https://github.com/grafana/k6-docs/issues/327