Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunyan not checking types #3

Closed
mcavage opened this issue Feb 7, 2012 · 1 comment
Closed

Bunyan not checking types #3

mcavage opened this issue Feb 7, 2012 · 1 comment

Comments

@mcavage
Copy link
Contributor

mcavage commented Feb 7, 2012

You need an Array.isArray check:

        server.on('after', restify.auditLogger({
            log: new Logger({
                name: 'audit',
                streams: {
                    level: 'info',
                    stream: process.stdout
                }
            })
        }));

throws:

TypeError: Object #<Object> has no method 'forEach'
    at new Logger (/Users/mark/work/cloudapi/node_modules/bunyan/lib/bunyan.js:311:21)
    at Object.createServer (/Users/mark/work/cloudapi/lib/app.js:178:18)
    at Object.<anonymous> (/Users/mark/work/cloudapi/main.js:90:18)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)
@trentm
Copy link
Owner

trentm commented Feb 8, 2012

This is in bunyan 0.5.2.

@trentm trentm closed this as completed Feb 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants