log-fs-writes

1.0.1 • Public • Published

log-fs-writes

NPM version Build Status Dependency Status Coverage percentage

Logs details any time any code in your node.js app (including dependencies) uses fs.* to write to the filesystem.

Built to help debugging when you're trying to figure out who/what/when/where/why something is writing to your disk.

Install

$ npm install --save-dev log-fs-writes

Usage

Include this at the top of your main app.js/server.js/whatever file

require('log-fs-writes');

Any time a fs.* write method is called, you'll get console output similar to this:

fs.writeFileSync(myfile.txt, file contents)
    at writeSomething (/Users/nfriedly/log-fs-writes/app.js:5:5)
    at Object.<anonymous> (/Users/nfriedly/log-fs-writes/app.js:8:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12):267:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)js:107:17)
    at node.js:814:3terface._onLine (readline.js:214:10)

License

MIT © Nathan Friedly

Package Sidebar

Install

npm i log-fs-writes

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • nfriedly