move couchdb/logger to lib