Skip to content

v13.0.0-beta.3

@mastermatt mastermatt tagged this 05 Apr 19:26
Consolidates the behavior around debugging and logging to exclusively use [`debug`](https://github.com/visionmedia/debug).

The use of `scope.log(console.log)` was problematic and confusing for consumers as that
appeared to be the correct approach when debugging unless they found the correct section in the README.
The use of the logger vs directly using `debug` in the core of Nock was inconsistent, especially when matching.
Now any failure to match a request will be directed to `debug` and if a single Interceptor is in context,
the namespace in the log will include the host from the Scope. This allows for filtering of logs to stdout
as well as differentiating colors from `debug`, when enabled.

BREAKING CHANGE:  `Scope.log` has been removed. Use the `debug` library when [debugging](https://github.com/nock/nock#debugging) failed matches.
Assets 2