Skip to content

Releases: gajus/roarr

v7.10.0

18 Mar 21:28
Compare
Choose a tag to compare

7.10.0 (2022-03-18)

Features

If you ever need to test what is getting logged, Roarr (v7.10) now has a neat trick:

const messages = [];

log.adopt(() => {
  yourApplication();
}, (message) => {
  messages.push(message);
});

messages now includes anything that is/will going to be logged by yourApplication (including any of the descending async contexts).

You could even do something like this:

log.adopt(() => {
  httpServer.listen(8080);
}, (message) => {
  messages.push(message);
})

Now messages would get appended to every time that HTTP server handles a request which produces Roarr logs.

Example of where this is useful:

gajus/fastify-webpack-hot@a71a8d8#diff-0fedfd7c9fb1766a8baa39c2f5350d5697dc81cf10fc2065d457242c437104a2R146-R168

v7.9.0

15 Mar 00:11
Compare
Choose a tag to compare

7.9.0 (2022-03-15)

Features

  • handle invalid roarr invocation (fda6d7a)

v7.8.2

02 Mar 19:50
Compare
Choose a tag to compare

7.8.2 (2022-03-02)

Bug Fixes

  • avoid unnecessary stringify / parse (2df6c4c)

v7.8.1

19 Feb 19:04
Compare
Choose a tag to compare

7.8.1 (2022-02-19)

Bug Fixes

  • replace json-stringify-safe with fast-safe-stringify (ff8a1f7)

v7.8.0

23 Nov 14:52
Compare
Choose a tag to compare

7.8.0 (2021-11-23)

Features

  • describe the unexpected type if message is not a string (e76d0ae)

v7.7.0

13 Nov 17:59
Compare
Choose a tag to compare

7.7.0 (2021-11-13)

Features

  • allow to override context type (a43937d)

v7.6.1

12 Nov 23:06
Compare
Choose a tag to compare

7.6.1 (2021-11-12)

Bug Fixes

  • loosen JsonObject definition to include undefined (e541931)

v7.6.0

12 Nov 15:12
Compare
Choose a tag to compare

7.6.0 (2021-11-12)

Features

v7.5.0

09 Nov 17:51
Compare
Choose a tag to compare

7.5.0 (2021-11-09)

Features

  • restrict allowed context values to serializable object (ece71aa)

v7.4.2

09 Nov 15:53
Compare
Choose a tag to compare

7.4.2 (2021-11-09)

Bug Fixes