diff options
author | isaacs <i@izs.me> | 2012-06-07 01:48:24 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-06-07 01:56:35 +0400 |
commit | 2568e40a395b809fb34125b3383f9f2616004f73 (patch) | |
tree | b770c89d4ed5a46341bf3b42e563a7fbf110af32 /bin | |
parent | d4b2d1149a0f2b56467ebeebd36e21d3a2bfe48a (diff) |
Replace the log util with npmlog module
This feels so good. lib/utils/log.js is the worst kind of
glue code that keeps the npm project from being properly
abstracted into independent pieces.
In the process, also cleaned up a lot of unproductive logging,
and made the npm-debug.log generated on errors be a bit more
easy to read.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/npm-cli.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js index f29437093..a71985b37 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -15,9 +15,9 @@ if (typeof WScript !== "undefined") { process.title = "npm" -var log = require("../lib/utils/log.js") -log.waitForConfig() -log.info("ok", "it worked if it ends with") +var log = require("npmlog") +log.pause() // will be unpaused when config is loaded. +log.info("it worked if it ends with", "ok") var fs = require("graceful-fs") , path = require("path") @@ -36,7 +36,7 @@ if (path.basename(process.argv[1]).slice(-1) === "g") { process.argv.splice(1, 1, "npm", "-g") } -log.verbose(process.argv, "cli") +log.verbose("cli", process.argv) var conf = nopt(types, shorthands) npm.argv = conf.argv.remain @@ -56,8 +56,8 @@ if (conf.versions) { return } -log.info("npm@"+npm.version, "using") -log.info("node@"+process.version, "using") +log.info("using", "npm@%s", npm.version) +log.info("using", "node@%s", process.version) // make sure that this version of node works with this version of npm. var semver = require("semver") |