Hide verbose logs behind debug flag

This commit is contained in:
Michael Jackson
2019-01-15 16:43:52 -08:00
parent a33a7c3ff5
commit 949c40f11e
6 changed files with 76 additions and 17 deletions

View File

@ -3,6 +3,7 @@ import https from 'https';
import { npmRegistryURL } from '../config';
import debug from './debug';
import bufferStream from './bufferStream';
import agent from './registryAgent';
@ -19,7 +20,7 @@ export default function fetchNpmPackageInfo(packageName) {
const infoURL = `${npmRegistryURL}/${encodedPackageName}`;
console.log('Fetching package info for %s from %s', packageName, infoURL);
debug('Fetching package info for %s from %s', packageName, infoURL);
const { hostname, pathname } = url.parse(infoURL);
const options = {