@@ -6,7 +6,7 @@ exports.usage = 'Attempts to install pre-built binary for module';
66
77const fs = require ( 'fs' ) ;
88const path = require ( 'path' ) ;
9- const log = require ( 'npmlog ' ) ;
9+ const log = require ( './util/log.js ' ) ;
1010const existsAsync = fs . exists || path . exists ;
1111const versioning = require ( './util/versioning.js' ) ;
1212const napi = require ( './util/napi.js' ) ;
2424}
2525
2626function place_binary ( uri , targetDir , opts , callback ) {
27- log . http ( 'GET' , uri ) ;
27+ log . log ( 'GET' , uri ) ;
2828
2929 // Try getting version info from the currently running npm.
3030 const envVersionInfo = process . env . npm_config_user_agent ||
@@ -57,7 +57,7 @@ function place_binary(uri, targetDir, opts, callback) {
5757 if ( proxyUrl ) {
5858 const ProxyAgent = require ( 'https-proxy-agent' ) ;
5959 agent = new ProxyAgent ( proxyUrl ) ;
60- log . http ( 'download' , ' proxy agent configured using: "%s"' , proxyUrl ) ;
60+ log . log ( 'download' , ` proxy agent configured using: "${ proxyUrl } "` ) ;
6161 }
6262
6363 fetch ( sanitized , { agent } )
@@ -71,7 +71,7 @@ function place_binary(uri, targetDir, opts, callback) {
7171 let extractions = 0 ;
7272 const countExtractions = ( entry ) => {
7373 extractions += 1 ;
74- log . info ( 'install' , ' unpacking %s' , entry . path ) ;
74+ log . info ( 'install' , ` unpacking ${ entry . path } ` ) ;
7575 } ;
7676
7777 dataStream . pipe ( extract ( targetDir , countExtractions ) )
@@ -148,7 +148,7 @@ function print_fallback_error(err, opts, package_json) {
148148 full_message += fallback_message ;
149149 log . warn ( 'Tried to download(' + err . statusCode + '): ' + opts . hosted_tarball ) ;
150150 log . warn ( full_message ) ;
151- log . http ( err . message ) ;
151+ log . error ( err . message ) ;
152152 } else {
153153 // If we do not have a statusCode that means an unexpected error
154154 // happened and prevented an http response, so we output the exact error
0 commit comments