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(); }