From 73e16ab1f5fbe7620a644bd9675800379c120193 Mon Sep 17 00:00:00 2001 From: Nico Kaiser Date: Thu, 17 Sep 2020 16:00:12 +0200 Subject: [PATCH 1/2] Add docs about `child()` method --- Readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Readme.md b/Readme.md index 667d357..d302591 100644 --- a/Readme.md +++ b/Readme.md @@ -35,6 +35,13 @@ Available methods: All methods are no operation functions. +Some loggers like Pino implement a `child()` method, which can be easily added to an `abstract-logging` instance in case it is needed: + +```js +const logger = require('abstract-logging') +logger.child = () => logger +``` + ## License [MIT License](http://jsumners.mit-license.org/) From 9c595093e61e4b92ebcda94890fd8a5c1635defd Mon Sep 17 00:00:00 2001 From: Nico Kaiser Date: Mon, 21 Sep 2020 13:55:51 +0200 Subject: [PATCH 2/2] Update Readme.md Co-authored-by: James Sumners --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index d302591..3204c86 100644 --- a/Readme.md +++ b/Readme.md @@ -35,7 +35,7 @@ Available methods: All methods are no operation functions. -Some loggers like Pino implement a `child()` method, which can be easily added to an `abstract-logging` instance in case it is needed: +Some loggers, like [Pino](https://getpino.io/), implement a `child()` method. This method can be easily added to an `abstract-logging` instance when stubbing out such loggers: ```js const logger = require('abstract-logging')