Socket
Book a DemoInstallSign in
Socket

spawn-log

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spawn-log

Log all the node processes that get spawned

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

This is a package that adds a bin that you can invoke to track all node processes that get run.

Do spawn-log node my-program.js and it'll output some log files in a folder named "node-process-log" in the current working directory.

The log files are named for the process id of the process, and contain the argv and cwd of the process.

For example, after running npm test in this project, it shows:

$ for i in node-process-log/*; do echo $i; cat $i | json; done
node-process-log/5178.json
{
  "argv": [
    "/usr/local/bin/node",
    "/Users/isaacs/dev/js/spawn-log/log-node-processes.js",
    "/usr/local/bin/npm",
    "run",
    "blerg"
  ],
  "cwd": "/Users/isaacs/dev/js/spawn-log"
}
node-process-log/5179.json
{
  "argv": [
    "/usr/local/bin/node",
    "/Users/isaacs/dev/js/spawn-log/log-node-processes.js",
    "blerg.js"
  ],
  "cwd": "/Users/isaacs/dev/js/spawn-log"
}
node-process-log/5180.json
{
  "argv": [
    "/usr/local/bin/node",
    "/Users/isaacs/dev/js/spawn-log/log-node-processes.js",
    "/Users/isaacs/dev/js/spawn-log/blerg.js",
    "child"
  ],
  "cwd": "/Users/isaacs/dev/js/spawn-log"
}

FAQs

Package last updated on 27 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts