mcavage/node-restify — Issue #50: want `res.sendError(error, noLog)` new "noLog" boolean arg
Author: trentm
Created: 2011-11-24 18:44:35+00:00
State: open

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. (/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.