uber-archive / nanny

Cluster management for Node processes
http://www.uber.com
MIT License
40 stars 4 forks source link

logger config in the example didn't work #8

Closed leizha closed 10 years ago

leizha commented 10 years ago

when logger: console was set as in the example, nanny failed to start

        this.logger.debug('worker state change', this.inspect());
                    ^
TypeError: Object #<Console> has no method 'debug'
    at WorkerSupervisor.do (/Users/leizha/Uber/ramen/server/node_modules/nanny/worker-supervisor.js:78:21)
    at WorkerSupervisor.start (/Users/leizha/Uber/ramen/server/node_modules/nanny/worker-supervisor.js:90:12)
    at ClusterSupervisor._spawnWorker (/Users/leizha/Uber/ramen/server/node_modules/nanny/cluster-supervisor.js:206:12)
    at ClusterSupervisor.<anonymous> (/Users/leizha/Uber/ramen/server/node_modules/nanny/cluster-supervisor.js:163:14)
    at Array.forEach (native)
    at ClusterSupervisor._initMaster (/Users/leizha/Uber/ramen/server/node_modules/nanny/cluster-supervisor.js:162:21)
    at ClusterSupervisor.start (/Users/leizha/Uber/ramen/server/node_modules/nanny/cluster-supervisor.js:72:10)
    at Object.<anonymous> (/Users/leizha/Uber/ramen/server/cluster.js:27:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)```
kriskowal commented 10 years ago

I will change the example. console is not sufficient. The logger must implement {info, error, warn, debug}, which is very much in the spirit of the console but not quite.

kriskowal commented 10 years ago

Addressed