From e421cbe09c9555da2cf30b77ee6ce76d6a8c1e0e Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 7 Jun 2017 09:37:51 -0700 Subject: [PATCH] logging-{w,b}: note about unhandled, uncaught (#2365) --- packages/logging-bunyan/README.md | 6 +++++- packages/logging-winston/README.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/logging-bunyan/README.md b/packages/logging-bunyan/README.md index 0439f6d9543..42dd0b64b46 100644 --- a/packages/logging-bunyan/README.md +++ b/packages/logging-bunyan/README.md @@ -68,7 +68,9 @@ var loggingBunyan = require('@google-cloud/logging-bunyan')({ ## Error Reporting -Any `Error` objects you log at severity `error` or higher can automatically be picked up by [Stackdriver Error Reporting][error-reporting] if your application is running on Google Cloud Platform. You may also want to see the [@google-cloud/error-reporting][@google-cloud/error-reporting] module which provides direct access to the Error Reporting API. +Any `Error` objects you log at severity `error` or higher can automatically be picked up by [Stackdriver Error Reporting][error-reporting] if your application is running on Google Cloud Platform. Make sure to add logs to your [uncaught exception][uncaught] and [unhandled rejection][unhandled] handlers if you want to see those errors too. + +You may also want to see the [@google-cloud/error-reporting][@google-cloud/error-reporting] module which provides direct access to the Error Reporting API. ## Formatting Request Logs @@ -98,3 +100,5 @@ The `httpRequest` proprety must be a properly formatted [`HttpRequest`][http-req [dev-console]: https://console.developers.google.com/project [error-reporting]: https://cloud.google.com/error-reporting/ [@google-cloud/error-reporting]: https://www.npmjs.com/package/@google-cloud/error-reporting +[uncaught]: https://nodejs.org/api/process.html#process_event_uncaughtexception +[unhandled]: https://nodejs.org/api/process.html#process_event_unhandledrejection diff --git a/packages/logging-winston/README.md b/packages/logging-winston/README.md index 21949cd1c08..f38af0a711b 100644 --- a/packages/logging-winston/README.md +++ b/packages/logging-winston/README.md @@ -72,7 +72,9 @@ winston.add(transport, { ## Error Reporting -Any `Error` objects you log at severity `error` or higher can automatically be picked up by [Stackdriver Error Reporting][error-reporting] if your application is running on Google Cloud Platform. You may also want to see the [@google-cloud/error-reporting][@google-cloud/error-reporting] module which provides direct access to the Error Reporting API. +Any `Error` objects you log at severity `error` or higher can automatically be picked up by [Stackdriver Error Reporting][error-reporting] if your application is running on Google Cloud Platform. Make sure to add logs to your [uncaught exception][uncaught] and [unhandled rejection][unhandled] handlers if you want to see those errors too. + +You may also want to see the [@google-cloud/error-reporting][@google-cloud/error-reporting] module which provides direct access to the Error Reporting API. ## Formatting Request Logs @@ -101,3 +103,5 @@ The `httpRequest` proprety must be a properly formatted [`HttpRequest`][http-req [http-request-message]: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#HttpRequest [error-reporting]: https://cloud.google.com/error-reporting/ [@google-cloud/error-reporting]: https://www.npmjs.com/package/@google-cloud/error-reporting +[uncaught]: https://nodejs.org/api/process.html#process_event_uncaughtexception +[unhandled]: https://nodejs.org/api/process.html#process_event_unhandledrejection