0.2.0 • Published 9 years ago
console2terminal v0.2.0
console2terminal
Stream browser console logging to terminal using websockets.
In client, do either:
require("console2terminal");or in ES6:
import "console2terminal";After this all console log messages will also be sent to a listening server on localhost.
To run the server, run:
node_modules/.bin/console2terminalor in Windows:
node_modules\.bin\console2terminalFor convenience, add the .bin directory to your PATH environment variable and get by with just console2terminal.
The server will output all the messages on stdout.
Navigating between/reloading pages will temporarily disconnect the websocket, which is indicated by an extra separator line on stdout like this, which helps to keep track of page loads.
---------------------------------Configuration
If you want to tune the configuration on the client side:
var c2t = require("console2terminal");
c2t({ silentBrowser: true });or in ES6:
import c2t from "console2terminal";
c2t({ silentBrowser: true });Configuration options
silentBrowserset to true to omit console log messages in the browser. This can improve performance noticeably.
Release history
- 0.1.0 - initial release
- 0.2.0 - add support for "undefined" values
Not supported
- functions
- symbols (ES6)