Logging

Each worker and the coordinator (your browser) keep a separate log of what is happening. When a job is complete, or a job fails, these logs are uploaded to PMRFS, GCS, or S3 depending on the storage type of the job. These contain system run level logs that are useful for debugging. You can add your own logging to these logs via context.log:

execution.addStage(new MapStage(async function map(x) {
  for await (const kv of x) {
    let [k, v] = kv; // destructure k/v pair
    context.log('key: ' + k);
  }
  await context.onComplete();
}));