flatiron/winston — pull request #324 by shaharke (2013-10-31 14:18:37+00:00)
Title: Should be possible to pass Error object to logger and have it passed (as an Error) to the transport

Today when passing an Error object to the logger, the Error (with the stack trace etc.) is "stringified" and not passed to the transport layer. In case meta data is not passed, the Error object will get passed as meta (but this seems to be more by accident than on deliberate).

My suggestion is to support the passing of Error objects to the logger and underlying transports, without breaking the current interface at all.

The use case I'm aiming at are transport that should be "aware" of Errors and not only strings. For example, the Sentry transport, should be able to send to Sentry an Error object, mainly because it allows the Sentry client to extract the relevant code frames and send them through.