How to use the corvid-local-logger.verbose 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-site / src / watcher.js View on Github external
const watch = async givenPath => {
  let ignoreBefore = 0;
  let ignoreAll = false;
  logger.verbose(getMessage("Watcher_Start_Log", { path: givenPath }));
  const rootPath = fs.realpathSync(givenPath);
  if (rootPath !== givenPath) {
    logger.debug(getMessage("Watcher_Path_Resolved_Log", { path: rootPath }));
  }

  const fullPath = relativePath => path.join(rootPath, relativePath);

  const isUnderRoot = pathToCheck =>
    isUnderPath(rootPath, fullPath(pathToCheck));

  const shouldIgnoreFile = watchPath => {
    const isInterestingPath =
      isSamePath(rootPath, watchPath) ||
      (isUnderRoot(watchPath) && isPathRelatedToSite(rootPath, watchPath));

    return !isInterestingPath;
github wix-incubator / corvid / packages / corvid-local-server / src / socket-api / index.js View on Github external
const withCloneModeNotification = asyncCallback => async (...args) => {
    const cloneModeBefore = isCloneMode();
    const result = await asyncCallback(...args);
    const cloneModeAfter = isCloneMode();
    if (cloneModeBefore && !cloneModeAfter) {
      logger.verbose(getMessage("Index_Clone_Complete_Log"));
      notifyAdmin("clone-complete");
    }
    return result;
  };
github wix-incubator / corvid / packages / corvid-local-server / src / server / originsMiddleWare.js View on Github external
return (socket, next) => {
    const origin = socket.handshake.headers.origin || "";
    const hostname = origin && new URL(origin).hostname;

    if (!allowedDomains.includes(hostname)) {
      logger.warn(getMessage("AdminToken_Error_Log", { origin }));
      return next(new Error(getMessage("Origin_Error")));
    }
    logger.verbose(getMessage("Origin_Accepted_Log", { origin }));
    next();
  };
}