From 2568e40a395b809fb34125b3383f9f2616004f73 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 6 Jun 2012 14:48:24 -0700 Subject: 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. --- lib/rebuild.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/rebuild.js') 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. -- cgit v1.2.3