apache / nano

Nano is now part of Apache CouchDB. Repo moved to https://GitHub.com/apache/couchdb-nano
https://github.com/apache/couchdb-nano
Other
1.13k stars 157 forks source link

Broken logging #284

Open jzaefferer opened 9 years ago

jzaefferer commented 9 years ago

I'm trying to get nano to log all requests while running tests, which are supposed to stub all nano calls. The logging looks like it should do that by providing DEBUG=nano/logger as an env var. Yet it doesn't actually log anything. After some searching I found that lib/logger.js exports a function that returns the logEvent function which then returns a log function. Unfortunately all the log() calls, like this one, end up calling the logEvent function, ignoring the resulting function, causing nothing to be logged.

I can't tell what the intention of that inner log() function is, that seems unnecessary and could be removed. Usually I'd send a PR, but considering #265 I'll hold off on that for now. Maybe an existing contributor (and CLA signee) can just apply the fix (or tell me what I'm doing wrong).

carlosduclos commented 7 years ago

This repository has been merged into couchdb-nano. This issue has been moved here. Please continue the discussion there.