We are using bunyan logger to log messages in Node.js v4.2.4 environment. In production we use "error" log levels only. Below is an example of using logger in code.
logger.error("Error getting database connection, %s", err);
Here the "err" is the error object returned from module.
What I am curious about is that whether this is correct way of handling errors and logging them ?
What are the other optimizations suggesting when using bunyan as logger in production ?