How to use the @parcel/logger.verbose function in @parcel/logger

To help you get started, we’ve selected a few @parcel/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 parcel-bundler / parcel / packages / core / parcel-bundler / src / Bundler.js View on Github external
// error in a dependency not directly handled by Parcel.
    if (processed.error !== null) {
      throw processed.error;
    }

    // Store resolved assets in their original order
    dependencies.forEach((dep, i) => {
      asset.dependencies.set(dep.name, dep);
      let assetDep = assetDeps[i];
      if (assetDep) {
        asset.depAssets.set(dep, assetDep);
        dep.resolved = assetDep.name;
      }
    });

    logger.verbose({
      origin: '',
      message: `Built ${asset.relativeName}...`,
    });

    if (this.cache && cacheMiss) {
      this.cache.write(asset.name, processed);
    }
  }
github parcel-bundler / parcel / packages / reporters / dev-server / src / Server.js View on Github external
logAccessIfVerbose(req: Request) {
    logger.verbose(`Request: ${req.headers.host}${req.originalUrl || req.url}`);
  }
github parcel-bundler / parcel / packages / core / workers / src / index.js View on Github external
bus.on('logEvent', (e: LogEvent) => {
    switch (e.level) {
      case 'info':
        invariant(typeof e.message === 'string');
        Logger.info(e.message);
        break;
      case 'progress':
        invariant(typeof e.message === 'string');
        Logger.progress(e.message);
        break;
      case 'verbose':
        invariant(typeof e.message === 'string');
        Logger.verbose(e.message);
        break;
      case 'warn':
        Logger.warn(e.message);
        break;
      case 'error':
        Logger.error(e.message);
        break;
      default:
        throw new Error('Unknown log level');
    }
  });
}