How to use the corvid-local-logger.logger.addSessionData 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-cli / src / utils / electron.js View on Github external
.then((result = {}) => {
          const getVersion = (url = "") => {
            if (new URL(url).host === "localhost") {
              return "local";
            } else {
              return url.substring(url.lastIndexOf("/") + 1);
            }
          };
          const santaVersion = getVersion(get_(result, "santaBase"));
          const editorVersion = getVersion(get_(result, "editorBase"));
          logger.addSessionData({ santaVersion, editorVersion });
        })
        .catch(e => logger.warn(`error reading editor versions: ${e.message}`));