Currently the screenshot utility swallows all console logs and errors from the 'story' context. This makes debugging screenshots extremely difficult. (It's also quite difficult to mount a debugger to the internal story isolate.)
This PR forwards console messages by default into the debug Logger channel, and optionally allows for a --forwardConsoleLogs option to surface them to the user's CLI with matched error, warn or info log levels.
Messages currently look like:
error From examples-thrusttestbench--screenshot-light (error): THREE.WebGLRenderer: Error creating WebGL context.
Happy to bikeshed the cli option name, format of the logs, etc.
This builds on https://github.com/reg-viz/storycap/pull/789, happy to rebase as needed.
Currently the screenshot utility swallows all console logs and errors from the 'story' context. This makes debugging screenshots extremely difficult. (It's also quite difficult to mount a debugger to the internal story isolate.)
This PR forwards console messages by default into the
debug
Logger channel, and optionally allows for a--forwardConsoleLogs
option to surface them to the user's CLI with matchederror
,warn
orinfo
log levels.Messages currently look like:
error From examples-thrusttestbench--screenshot-light (error): THREE.WebGLRenderer: Error creating WebGL context.
Happy to bikeshed the cli option name, format of the logs, etc.