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 /lib/rebuild.js | |
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 'lib/rebuild.js')
-rw-r--r-- | lib/rebuild.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rebuild.js b/lib/rebuild.js index 0e1d56a1d..a4a39f7b9 100644 --- a/lib/rebuild.js +++ b/lib/rebuild.js @@ -3,7 +3,7 @@ module.exports = rebuild var readInstalled = require("./utils/read-installed.js") , semver = require("semver") - , log = require("./utils/log.js") + , log = require("npmlog") , path = require("path") , npm = require("./npm.js") , output = require("./utils/output.js") @@ -17,14 +17,14 @@ rebuild.completion = require("./utils/completion/installed-deep.js") function rebuild (args, cb) { readInstalled(npm.prefix, function (er, data) { - log(typeof data, "read Installed") + log.info("readInstalled", typeof data) if (er) return cb(er) var set = filter(data, args) , folders = Object.keys(set).filter(function (f) { return f !== npm.prefix }) if (!folders.length) return cb() - log.silly(folders, "rebuild set") + log.silly("rebuild set", folders) cleanBuild(folders, set, cb) }) } @@ -79,7 +79,7 @@ function filter (data, args, set, seen) { } } if (pass && data._id) { - log.verbose([data.path, data._id], "path id") + log.verbose("rebuild", "path, id", [data.path, data._id]) set[data.path] = data._id } // need to also dive through kids, always. |