Inspect logs
Logs are messages you can add to your test script to help you debug tests. You can use the following methods:
console.log()
console.info()
console.warn()
console.error()
console.debug()
- Only shown when running k6 with the
-v/--verbose
flag.
- Only shown when running k6 with the
To view all the logs for a test run, click the Logs tab. Depending on the method you’re using, a green, yellow, or red marking is displayed next to each log.
You can select a log message to expand it and see more details such as:
- instance_id
- level
- lz (load zone)
- source
- test_run_id
You can also filter the list by using:
- Filter: Filter by text in the log message.
- Level: Choose from the different level options.
- Info:
console.log
andconsole.info
. - Debug:
console.debug
. - Warning:
console.warning
. - Error:
console.error
.
- Info:
- Load zone: Choose from the different load zones used in the test run.