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

want res.sendError(error, noLog) new "noLog" boolean arg #50

Closed
trentm opened this issue Nov 24, 2011 · 2 comments
Closed

want res.sendError(error, noLog) new "noLog" boolean arg #50

trentm opened this issue Nov 24, 2011 · 2 comments

Comments

@trentm
Copy link
Contributor

trentm commented Nov 24, 2011

I like the logging of error responses:

2011-11-24 18:35:00Z WARN: ErrorSent(requestId=095b86af-d734-4ee5-99bf-9156f4eedc92): HttpCode=500, RestCode=InternalError, message=error determining account for 'admin':
InternalError: error determining account for 'admin'
    at EventEmitter.<anonymous> (/Users/trentm/widget.js:292:33)
    at EventEmitter.emit (events.js:64:17)
    ...

and I want to use res.sendError for all my error responses for the common response formatting:

{
  "code": "ResourceNotFound",
  "message": "no such login: 'adminasdf'"
}

However, I'd like to NOT bother logging the response and stack for some error responses, e.g. a simple 404 for some cases. Would you be amenable to a "noLog" boolean to skip logging on a one-off? If so, I can impl. it.

@mcavage
Copy link
Contributor

mcavage commented Nov 24, 2011

Fine with me!

@mcavage
Copy link
Contributor

mcavage commented Dec 1, 2011

Will be in npm@0.5.5.

@mcavage mcavage closed this as completed Dec 1, 2011
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