From 00f475e061a92afc09b3e5c1d87e60ca35cefc76 Mon Sep 17 00:00:00 2001 From: Janek Lasocki-Biczysko Date: Sun, 6 Nov 2022 23:01:28 +0000 Subject: [PATCH 1/4] docs: add 'best performance for basic stdout logging' to help.md My attempt to capture @mcollina's reply: https://github.com/pinojs/pino/issues/1491#issuecomment-1180129193 in some doc form --- docs/help.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/help.md b/docs/help.md index 02723d42a..64d7a40c3 100644 --- a/docs/help.md +++ b/docs/help.md @@ -12,6 +12,7 @@ * [Unicode and Windows terminal](#windows) * [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver) * [Avoid Message Conflict](#avoid-message-conflict) +* [Best performance for basic stdout logging](#best-performance-for-stdout) ## Log rotation @@ -288,3 +289,16 @@ log.info({ msg: 'mapped to originalMsg' }, 'a message') // {"level":30,"time":1596313323106,"pid":63739,"hostname":"foo","msg":"no original message"} // {"level":30,"time":1596313323107,"pid":63739,"hostname":"foo","msg":"a message","originalMsg":"mapped to originalMsg"} ``` + + +## Best performance for basic stdout logging + +The best performance for logging directly to stdout is achieved by using the +default configuration: + +```js +const log = require('pino')(); +``` + +You should only have to configure custom transports if you have broader logging +requirements. From 902b0871a00b97111282cacb340e3043fe3cbf11 Mon Sep 17 00:00:00 2001 From: Janek Lasocki-Biczysko Date: Sun, 6 Nov 2022 23:04:34 +0000 Subject: [PATCH 2/4] change help section --- docs/help.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/help.md b/docs/help.md index 64d7a40c3..64cae072b 100644 --- a/docs/help.md +++ b/docs/help.md @@ -12,7 +12,7 @@ * [Unicode and Windows terminal](#windows) * [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver) * [Avoid Message Conflict](#avoid-message-conflict) -* [Best performance for basic stdout logging](#best-performance-for-stdout) +* [Best performance for logging to `stdout`](#best-performance-for-stdout) ## Log rotation @@ -291,7 +291,7 @@ log.info({ msg: 'mapped to originalMsg' }, 'a message') ``` -## Best performance for basic stdout logging +## Best performance for logging to `stdout` The best performance for logging directly to stdout is achieved by using the default configuration: From a05fce5ced8738744cf388464cf52705d1a293a1 Mon Sep 17 00:00:00 2001 From: Janek Lasocki-Biczysko Date: Tue, 8 Nov 2022 12:02:51 +0000 Subject: [PATCH 3/4] Update docs/help.md Co-authored-by: Matteo Collina --- docs/help.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/help.md b/docs/help.md index 64cae072b..868b5b10e 100644 --- a/docs/help.md +++ b/docs/help.md @@ -293,7 +293,7 @@ log.info({ msg: 'mapped to originalMsg' }, 'a message') ## Best performance for logging to `stdout` -The best performance for logging directly to stdout is achieved by using the +The best performance for logging directly to stdout is _usually_ achieved by using the default configuration: ```js From 73d5862ec66ef8160bb03f57fafbd70d08f29586 Mon Sep 17 00:00:00 2001 From: Janek Lasocki-Biczysko Date: Tue, 8 Nov 2022 12:02:57 +0000 Subject: [PATCH 4/4] Update docs/help.md Co-authored-by: Matteo Collina --- docs/help.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/help.md b/docs/help.md index 868b5b10e..a0aea6fde 100644 --- a/docs/help.md +++ b/docs/help.md @@ -300,5 +300,5 @@ default configuration: const log = require('pino')(); ``` -You should only have to configure custom transports if you have broader logging -requirements. +You should only have to configure custom transports or other settings +if you have broader logging requirements.