         db: 'cozy'
     }
 
+    logCouchdb = initLogCouchdb()
 
     # credentials retrieved by environment variable
     if process.env.VCAP_SERVICES?

cradle = require 'cradle'

setup_credentials = ->
    #default credentials
    credentials = {
        host : 'localhost',

        credentials.host = couch.host ? '127.0.0.1'
        credentials.port = couch.port ? '5984'
        credentials.db = couch.name ? 'cozy'
        if logCouchdb[0]? and logCouchdb[1]?
            credentials.auth = \
                    {username: logCouchdb[0], password: logCouchdb[1]}

    return credentials

