How to use the corvid-local-logger.logger.info function in corvid-local-logger

To help you get started, we’ve selected a few corvid-local-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wix-incubator / corvid / packages / corvid-local-server / src / server.js View on Github external
logger.info(getMessage("Server_Clone_Project_Not_Empty_Site_Log"));
      throw new UserError("CAN_NOT_PULL_NON_EMPTY_SITE");
    }
  }

  if (isPullForce(options)) {
    if (!isWix) {
      logger.info(getMessage("Server_PullForce_Project_Not_Found_Log"));
      throw new UserError("CAN_NOT_PULL_NON_WIX_SITE");
    }
    await fs.emptyDir(siteSrcPath);
  }

  if (isPullMove(options)) {
    if (!isWix) {
      logger.info(getMessage("Server_PullMove_Project_Not_Found_Log"));
      throw new UserError("CAN_NOT_PULL_NON_WIX_SITE");
    }
    const snapshotFolder = path.join(
      siteRootPath,
      ".corvid",
      "snapshots",
      Date.now().toString()
    );

    await fs.move(siteSrcPath, snapshotFolder);
    await fs.emptyDir(siteSrcPath);
  }

  let localSite, editorServer, adminServer;

  const closeAll = () =>
github wix-incubator / corvid / packages / corvid-local-site / src / readWrite.js View on Github external
const withStartFinishLog = callback => async (...args) => {
    logger.info(`${callback.name} started`);
    const result = await callback(...args);
    logger.info(`${callback.name} finished`);
    return result;
  };