correct logging

pull/20/head
Johannes J. Schmidt 11 years ago
parent b53060fec3
commit 2762f738d3

@ -27,8 +27,6 @@ couchmagick.get({
// } // }
}, function(config) { }, function(config) {
console.log(config);
var auth = config.auth && config.auth.username && config.auth.password ? var auth = config.auth && config.auth.username && config.auth.password ?
[config.auth.username, config.auth.password].join(':') : [config.auth.username, config.auth.password].join(':') :
null; null;
@ -51,13 +49,13 @@ couchmagick.get({
var stream = magick(url.resolve(couch, db), options); var stream = magick(url.resolve(couch, db), options);
// stream.pipe(couchmagick.info()); stream.on('error', couchmagick.error);
// stream.on('error', couchmagick.error().write); stream.on('data', function(data) {
couchmagick.info(data.response);
});
stream.on('end', next); stream.on('end', next);
} }
console.log('start list dbs');
nano(couch).db.list(function(err, dbs) { nano(couch).db.list(function(err, dbs) {
async.eachSeries(dbs, listen, function() { async.eachSeries(dbs, listen, function() {
couchmagick.info('done.'); couchmagick.info('done.');

@ -1,6 +1,6 @@
{ {
"name": "couchmagick", "name": "couchmagick",
"version": "0.1.0", "version": "0.1.1",
"description": "Run ImageMagicks `convert` on CouchDB documents.", "description": "Run ImageMagicks `convert` on CouchDB documents.",
"main": "index.js", "main": "index.js",
"preferGlobal": true, "preferGlobal": true,
@ -29,8 +29,8 @@
"dependencies": { "dependencies": {
"async": "~0.2.9", "async": "~0.2.9",
"event-stream": "~3.0.20", "event-stream": "~3.0.20",
"couchmagick-listen": "~1.0.5", "couchmagick-listen": "~1.0.6",
"couch-daemon": "~1.1.2", "couch-daemon": "~1.1.3",
"nano": "~4.2.1" "nano": "~4.2.1"
}, },
"devDependencies": { "devDependencies": {

Loading…
Cancel
Save