Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including socket.log with all npm packages installed. Try it out:

var socketLog = require("socket.log")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

socket.log v0.1.0

Remote debugging logger for JavaScript.

What is it?

Socket.log is a [very] simple socket relay for console.log for use on legacy devices, often in obscure situations. The particular itch that needed scratching in this case was Android WebViews.

Note this was only ever built as a quick fix, so it's untested, etc etc.

Installation

npm install socket.log

Support

Should work on pretty much anything – will use WebSockets where available, and fall back to XMLHTTPRequest where it has to.

Usage

  1. Start the server:

    npm start
    
  2. Run a console window in a browser, go to http://localhost:8088, and open the JS console (CMD+ALT+J in Chrome).

  3. Using the IP address accessible to the logging device, add the following script tag to the head of the page under test:

    <script type="text/javascript" src="http://10.42.3.37:8088/console.js"></script>
    
  4. Let the logging fun commence.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free