From 015842f3d24eb8641199bf67b262c7e44e4db99a Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Wed, 23 Nov 2022 15:34:37 +0900 Subject: [PATCH] doc: use console.error for error case in http2 console.error is more suitable than console.log for error case. PR-URL: https://github.com/nodejs/node/pull/45577 Reviewed-By: Rafael Gonzaga Reviewed-By: Santiago Gimeno Reviewed-By: Paolo Insogna Reviewed-By: Daeyeon Jeong --- doc/api/http2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 460d358481f0f5..1b2d7c246367d2 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -43,7 +43,7 @@ let http2; try { http2 = require('node:http2'); } catch (err) { - console.log('http2 support is disabled!'); + console.error('http2 support is disabled!'); } ``` @@ -61,7 +61,7 @@ let http2; try { http2 = await import('node:http2'); } catch (err) { - console.log('http2 support is disabled!'); + console.error('http2 support is disabled!'); } ``` @@ -1850,7 +1850,7 @@ server.on('stream', (stream) => { } } catch (err) { // Perform actual error handling. - console.log(err); + console.error(err); } stream.end(); }