From f590bb27e924eff7ea72476d2f01d90e643f92ed Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Tue, 22 Nov 2022 23:08:23 +0900 Subject: [PATCH] doc: use console.error for error case in http2 console.error is more suitable than console.log for error case. --- 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(); }