code: function logError(message, err, context, event) {
    var current_err = err;
    while (current_err) {
      var next_err = current_err._previous;
      delete current_err._previous;
      if (current_err.stack) {
        console.error(current_err.stack);
      } else {
        console.error(current_err);
      }
      current_err = next_err;
    }
    // TODO add cli options for logging out context and event as well
  }
docs: Log Errors With Some Textual Context