From d87c34d20fed1382e47b72677e146cfec5a868be Mon Sep 17 00:00:00 2001 From: Greg Cochard Date: Mon, 2 Oct 2017 15:54:36 -0700 Subject: [PATCH 1/2] Fix bunyan stream example Pass log level to .stream() as specified in https://github.com/trentm/node-bunyan#streams-introduction --- logging/logs.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/logging/logs.js b/logging/logs.js index 13aa958513..d5550f3b2b 100644 --- a/logging/logs.js +++ b/logging/logs.js @@ -73,13 +73,11 @@ function loggingBunyan () { // The JSON payload of the log as it appears in Stackdriver Logging // will contain "name": "my-service" name: 'my-service', - // log at 'info' and above - level: 'info', streams: [ // Log to the console { stream: process.stdout }, - // And log to Stackdriver Logging - loggingBunyan.stream() + // And log to Stackdriver Logging at 'info' and above + loggingBunyan.stream('info') ] }); From bdc13e4b130e090659bb264d90ca155b381c6ace Mon Sep 17 00:00:00 2001 From: Greg Cochard Date: Tue, 3 Oct 2017 11:40:59 -0700 Subject: [PATCH 2/2] Update logs.js --- logging/logs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging/logs.js b/logging/logs.js index d5550f3b2b..de20f98b09 100644 --- a/logging/logs.js +++ b/logging/logs.js @@ -75,7 +75,7 @@ function loggingBunyan () { name: 'my-service', streams: [ // Log to the console - { stream: process.stdout }, + { stream: process.stdout, level: 'info' }, // And log to Stackdriver Logging at 'info' and above loggingBunyan.stream('info') ]