Capture all the logs

added by JavaScript Kicks
7/8/2019 7:15:55 AM

200 Views

How to capture console.log, console.error and even DEBUG=... logs. In this blog post I will show how to intercept messages logged by a Node process using a pre-loaded module. You can find the source code for these examples in bahmutov/capture-logs-example repository. Imagine you want to collect all strings logged from a Node program.


0 comments