From 380bb6a87f23f423df558c2cdb91bad8926464e0 Mon Sep 17 00:00:00 2001 From: Ilya Radchenko Date: Fri, 27 Oct 2017 05:15:15 -0400 Subject: [PATCH] docs: use debug namespace instead of all namespaces (#1174) This changes the debugging instructions to be specific to puppeteer, preventing new users (or those that copy-paste) from getting logs from other libraries that use the `debug` module. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1d407ec4..538abd9f 100644 --- a/README.md +++ b/README.md @@ -160,19 +160,19 @@ Explore the [API documentation](docs/api.md) and [examples](https://github.com/G 1. Enable verbose logging - All public API calls and internal protocol traffic - will be logged via the [`debug`](https://github.com/visionmedia/debug) module. + will be logged via the [`debug`](https://github.com/visionmedia/debug) module under the `puppeteer` namespace. ```sh # Basic verbose logging - env DEBUG="*" node script.js + env DEBUG="puppeteer:*" node script.js # Debug output can be enabled/disabled by namespace - env DEBUG="*,-*:protocol" node script.js # everything BUT protocol messages - env DEBUG="*:session" node script.js # protocol session messages (protocol messages to targets) - env DEBUG="*:mouse,*:keyboard" node script.js # only Mouse and Keyboard API calls + env DEBUG="puppeteer:*,-puppeteer:protocol" node script.js # everything BUT protocol messages + env DEBUG="puppeteer:session" node script.js # protocol session messages (protocol messages to targets) + env DEBUG="puppeteer:mouse,puppeteer:keyboard" node script.js # only Mouse and Keyboard API calls # Protocol traffic can be rather noisy. This example filters out all Network domain messages - env DEBUG="*" env DEBUG_COLORS=true node script.js 2>&1 | grep -v '"Network' + env DEBUG="puppeteer:*" env DEBUG_COLORS=true node script.js 2>&1 | grep -v '"Network' ```