You may use the storeConsoleLog method to write the current browser's console output to disk with the given filename. Console output will be stored within the tests/Browser/console directory:
storeConsoleLog
tests/Browser/console
$browser->storeConsoleLog('filename');