{"_id":"whistlepunk","_rev":"27-2a628cf4e0b80230126102d7dc3af7b3","name":"whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","dist-tags":{"latest":"2.0.0","update-deps":"0.3.4-update-deps.0"},"versions":{"0.0.1":{"name":"whistlepunk","version":"0.0.1","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"./node_modules/mocha/bin/mocha -r spec/helpers/node-setup.js spec","coverage":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -x 'spec/**/*'  -- -r spec/helpers/node-setup.js spec spec/*.spec.js","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"^1.0.3","debug":"^2.1.1","lodash":"^2.4.1","moment":"^2.8.4"},"devDependencies":{"istanbul":"^0.3.2","mocha":"^1.21.4","should":"^4.0.4"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"220ad897977d8211ce688da7c993974e1f6e96b2","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.0.1","_shasum":"f44efa532bfb2e12d08fc426384d24f2c570effd","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ifandelse","email":"jim@ifandelse.com"},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"}],"dist":{"shasum":"f44efa532bfb2e12d08fc426384d24f2c570effd","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.0.1.tgz","integrity":"sha512-7L1OO6VOvsU5u++J6/oHsj06d5s2+trZmq1TRujnRr6UgoWFl1z8n71INUqC7bobpQnrRv++Tr+YPUV0X8+Kgg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfb4Chgd2o2zbJRFA82pRVZ19j6ozgYO+qb4RtdT9EuAiEAtrmVUUHEFeiB7p7powD2GYoZV2ST15ZakP9pQMv1mKE="}]},"directories":{}},"0.1.0":{"name":"whistlepunk","version":"0.1.0","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"./node_modules/mocha/bin/mocha -r spec/helpers/node-setup.js spec","coverage":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -x 'spec/**/*'  -- -r spec/helpers/node-setup.js spec spec/*.spec.js","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.1.1","lodash":"2.4.1","moment":"2.9.0","when":"3.6.4"},"devDependencies":{"istanbul":"~0.3.2","mocha":"~2.1.0","postal":"~0.12.3","should":"~4.6.1"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"5c6e15177520e6b7656e2ab6040b6f2799654696","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.1.0","_shasum":"230e981f05a0b60b097c5dfea5c27d000e73b430","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ifandelse","email":"jim@ifandelse.com"},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"}],"dist":{"shasum":"230e981f05a0b60b097c5dfea5c27d000e73b430","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.1.0.tgz","integrity":"sha512-+FLL3xPfS7KSxZFe5AV7HwbLaWe6s+zvnbf/+mTPT6e5grtP+lh0o6mJUnafXp3ZXYDhPOnh++3gIFlk+7IQtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdpq7Bx0ESQ6QFyC/jbqeYQTlRK6wejwrGjUwaxC1TqAiAk3A92hM/mFKDHw1J9GyVGgq7LUilXLp8S/YV1GkQ6yw=="}]},"directories":{}},"0.2.0":{"name":"whistlepunk","version":"0.2.0","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"mocha ./spec/**/*.spec.js -R spec","coverage":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -x 'spec/**/*'  -- -r spec/helpers/node-setup.js spec spec/*.spec.js","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.1.1","lodash":"2.4.1","machina":"1.0.0-1","moment":"2.9.0","when":"3.6.4"},"devDependencies":{"gulp":"^3.8.11","gulp-istanbul":"^0.6.0","gulp-jshint":"^1.9.2","gulp-mocha":"^2.0.0","istanbul":"~0.3.2","jshint-stylish":"^1.0.0","mocha":"~2.1.0","open":"0.0.5","postal":"~0.12.3","should":"~4.6.1","sinon":"^1.12.2"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"57228c5fcb89fbc5670621b9b991356bfcd290ab","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.2.0","_shasum":"9c87241806656af9810a4eb59961408a85fe1287","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.35","_npmUser":{"name":"arobson","email":"asrobson@gmail.com"},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"}],"dist":{"shasum":"9c87241806656af9810a4eb59961408a85fe1287","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.2.0.tgz","integrity":"sha512-Az6ZmwjgqOawIQ5JnmvbM4M7i2y2klG14pK11T+46M4U1n50h7GM30LkrIxOHCairWtMc8dSQFEpS4/HyzqJ3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuCIXsTgISGF+e0wGMTxzdeVJo/JbpAoh73GUasowNlAIgGJydNItfmPlfy4C9EOc0bqlt0LWtSu02UPh3fpAUMqM="}]},"directories":{}},"0.2.1":{"name":"whistlepunk","version":"0.2.1","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"gulp test","coverage":"gulp coverage","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.1.1","lodash":"~3.5.0","machina":"1.0.0-2","moment":"2.9.0","when":"~3.7.2"},"devDependencies":{"chai":"^2.1.0","chai-as-promised":"^4.2.0","gulp":"^3.8.11","gulp-istanbul":"^0.6.0","gulp-jshint":"^1.9.2","gulp-mocha":"^2.0.0","gulp-spawn-mocha":"^2.0.1","gulp-watch":"4.1.1","istanbul":"~0.3.2","jshint-stylish":"^1.0.0","mocha":"~2.1.0","open":"0.0.5","postal":"~0.12.3","proxyquire":"^1.4.0","sinon":"^1.12.2","sinon-as-promised":"^2.0.3","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"813c76958e82845e1fc31e8d814f5949f8d6f6c5","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.2.1","_shasum":"83156b46e42d28fbf61e6857e0bc6293204b1766","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.10.32","_npmUser":{"name":"dougneiner","email":"doug@dougneiner.com"},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"}],"dist":{"shasum":"83156b46e42d28fbf61e6857e0bc6293204b1766","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.2.1.tgz","integrity":"sha512-aS+6ZPct+cmjT5Qe5bg5CuohFSaxQ4/RsiGyZYIgj1suc/3hmX34yUkaD7jniBbQPDjK8HlncGKnM6SKXuPTyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDegZv/HvwBnkPQ/1KLGvGqpyENB/5KlqVxhiORpi1LfQIhALYPExY3gCdpB0V7IVsaXwDkoeA7TKwXVd9y+dqQ76rF"}]},"directories":{}},"0.3.0":{"name":"whistlepunk","version":"0.3.0","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"gulp test","coverage":"gulp coverage","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.1.1","lodash":"3.x","machina":"1.x","moment":"2.9.0","when":"3.x"},"devDependencies":{"chai":"^2.1.0","chai-as-promised":"^4.2.0","gulp":"^3.8.11","gulp-istanbul":"^0.6.0","gulp-jshint":"^1.9.2","gulp-mocha":"^2.0.0","gulp-spawn-mocha":"^2.0.1","gulp-watch":"4.1.1","istanbul":"~0.3.2","jshint-stylish":"^1.0.0","mocha":"~2.1.0","open":"0.0.5","postal":"1.x","proxyquire":"^1.4.0","sinon":"^1.12.2","sinon-as-promised":"^2.0.3","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"c14c7afe5861fa195ac8e2d3fb681418919f3cd6","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.3.0","_shasum":"0729190ffdb8bec8082bf2cccdcbccd74b99a714","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"ifandelse","email":"jim@ifandelse.com"},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"}],"dist":{"shasum":"0729190ffdb8bec8082bf2cccdcbccd74b99a714","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.3.0.tgz","integrity":"sha512-GLEe5Bj7x3mWV62POj+aKTuFvav280OsJ5LoOlPahLYTylCpmAC1EpALpTVjfHaYAPs/GOrR05V0uMSOrS1tFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVh9iafiIk+6l63iICMuS+W5xNTUoelKJy3R6CpLe7eAiAAg8kPVzhjnlePU2vme/+Xcdxvem/ij/r7UFryxJa4nQ=="}]},"directories":{}},"0.3.1":{"name":"whistlepunk","version":"0.3.1","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"gulp test","coverage":"gulp coverage","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.1.3","lodash":"3.x","machina":"1.x","moment":"2.10.2","when":"3.x"},"devDependencies":{"chai":"^2.1.0","chai-as-promised":"^4.2.0","gulp":"^3.8.11","gulp-istanbul":"^0.8.1","gulp-jshint":"^1.9.2","gulp-mocha":"^2.0.0","gulp-spawn-mocha":"^2.0.1","gulp-watch":"4.2.4","istanbul":"~0.3.2","jshint-stylish":"^1.0.0","mocha":"~2.2.4","open":"0.0.5","postal":"1.x","proxyquire":"^1.4.0","sinon":"^1.12.2","sinon-as-promised":"^3.0.0","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"95bbe3014eef29289ac1fe232a8343c2c3cd62b2","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.3.1","_shasum":"ed5e8ca937dea093bb7e45a60a3bb1e271b5432f","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"ifandelse","email":"jim@ifandelse.com"},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"}],"dist":{"shasum":"ed5e8ca937dea093bb7e45a60a3bb1e271b5432f","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.3.1.tgz","integrity":"sha512-2VJZmIS7upN6XDzTNUK2Fp9UG8sI+n4ihV7hDQCpp1za8slO3NUUh0QsN6hdTH42IC3FJZSit20BWS+dr9fBJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVJmCGyJbNhZYPdo5hEsRpfdyNnbwIcG9AJrjWutRYRAIhAIPBdp7sfGHVOeoKnJf17i5RnnI+4qEkFUqqn4A6MoCa"}]},"directories":{}},"0.3.2":{"name":"whistlepunk","version":"0.3.2","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"},{"name":"Derick Bailey","email":"derickbailey@gmail.com","url":"http://derickbailey.com"},{"name":"Michael Tuttle","url":"https://github.com/openam"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"gulp test","coverage":"gulp coverage","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.2.0","lodash":"3.x","machina":"1.x","moment":"2.10.2","when":"3.x"},"devDependencies":{"chai":"^2.1.0","chai-as-promised":"^4.2.0","gulp":"^3.8.11","gulp-istanbul":"^0.8.1","gulp-jshint":"^1.9.2","gulp-mocha":"^2.0.0","gulp-spawn-mocha":"^2.0.1","gulp-watch":"4.2.4","istanbul":"~0.3.2","jshint-stylish":"^1.0.0","mocha":"~2.2.4","open":"0.0.5","postal":"1.x","proxyquire":"^1.4.0","sinon":"^1.12.2","sinon-as-promised":"^3.0.0","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"84ce3f9da3de88a8a7fdb79bbd7d78b1894ba670","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.3.2","_shasum":"17d5d5d5377cf21899cf1ca1a6a38aef0cd781ef","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"arobson","email":"asrobson@gmail.com"},"dist":{"shasum":"17d5d5d5377cf21899cf1ca1a6a38aef0cd781ef","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.3.2.tgz","integrity":"sha512-Eiwwks4iue/COM/+GUO+OqOfJ6snEtYJOaYcZ7NIlHXb64dCxRZ9Y5AUaJFVgShWmh5rOO25iAaBwLCaybNZWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyxqOyoTPpuE2VD/OU5XRcWr0jLGnjsZ61G+EOod3kuAiAx5STQ2Gl4UON7BwTdgoBM5jUDuRqAxjEiBCbrFRRHcw=="}]},"maintainers":[{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"}],"directories":{}},"0.3.3":{"name":"whistlepunk","version":"0.3.3","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"},{"name":"Derick Bailey","email":"derickbailey@gmail.com","url":"http://derickbailey.com"},{"name":"Michael Tuttle","url":"https://github.com/openam"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"test":"gulp test","coverage":"gulp coverage","show-coverage":"open ./coverage/lcov-report/index.html"},"dependencies":{"colors":"1.0.3","debug":"2.2.0","lodash":"3.x","machina":"1.x","moment":"2.10.2","when":"3.x","postal":"1.x"},"devDependencies":{"chai":"^2.1.0","chai-as-promised":"^4.2.0","gulp":"^3.8.11","gulp-istanbul":"^0.8.1","gulp-jshint":"^1.9.2","gulp-mocha":"^2.0.0","gulp-spawn-mocha":"^2.0.1","gulp-watch":"4.2.4","istanbul":"~0.3.2","jshint-stylish":"^1.0.0","mocha":"~2.2.4","open":"0.0.5","proxyquire":"^1.4.0","sinon":"^1.12.2","sinon-as-promised":"^3.0.0","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"files":["src","LICENSE"],"gitHead":"ac9419fb1ee272287c08f2144ad1e0a6d3b85eac","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.3.3","_shasum":"81333f869f9b77429b2915a3500124c84c13b560","_from":".","_npmVersion":"2.8.4","_nodeVersion":"0.12.2","_npmUser":{"name":"johndmathis","email":"john@inplicity.com"},"dist":{"shasum":"81333f869f9b77429b2915a3500124c84c13b560","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.3.3.tgz","integrity":"sha512-zfJ2Ts9LosX3uWhmP9s78c8qXyuAhgm/E9xlztPKyPb7+Cq2foKntt7SGWt77WCNTf6zEOLrAEImmCF43FL7fA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBy+agsDTbJB2fiXp9pXOy7i7wk2w4DQMh37EpWiuE/+AiAc6fLGFlMrv+IopJMMsZNW7BkO6CCEeQskatLCRAwytw=="}]},"maintainers":[{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"},{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"johndmathis","email":"john@inplicity.com"}],"directories":{}},"0.3.4-update-deps.0":{"name":"whistlepunk","version":"0.3.4-update-deps.0","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"},{"name":"Derick Bailey","email":"derickbailey@gmail.com","url":"http://derickbailey.com"},{"name":"Michael Tuttle","url":"https://github.com/openam"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"lint":"eslint --fix ./","pretest":"npm run lint","test:only":"NODE_ENV=test mocha --exit -R spec 'spec/**/*.spec.js'","test:ci":"NODE_ENV=test mocha --exit -R spec 'spec/behavior/**/*.spec.js'","test":"npm run cover","cover":"nyc -r text-summary -r html -- npm run test:only","cover:ci":"nyc -r text-summary -r html -- npm run test:ci","cover:show":"open \"file://$PWD/coverage/index.html\""},"dependencies":{"colors":"1.0.3","debug":"2.4.5","lodash":"4.17.20","machina":"^4.0.2","moment":"^2.29.1","postal":"1.x"},"devDependencies":{"chai":"^2.1.0","dirty-chai":"^2.0.1","eslint-config-leankit":"^6.0.0","mocha":"^8.2.1","nyc":"^15.1.0","open":"^7.3.0","proxyquire":"^1.4.0","sinon":"^2.0.0","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"nyc":{"exclude":["config.local.*","coverage","configs","spec",".eslintrc.js"],"sourceMap":false,"instrument":true,"all":true},"readme":"# Whistlepunk\n\n[![Version npm](https://img.shields.io/npm/v/whistlepunk.svg?style=flat)](https://www.npmjs.com/package/whistlepunk)\n[![npm Downloads](https://img.shields.io/npm/dm/whistlepunk.svg?style=flat)](https://www.npmjs.com/package/whistlepunk)\n[![Dependencies](https://img.shields.io/david/LeanKit-Labs/whistlepunk.svg?style=flat)](https://david-dm.org/LeanKit-Labs/whistlepunk)\n\n> *noun* - a lumberjack who operates the signal wire running to a donkey engine whistle.\n\n## What Is It?\nLogging.....sigh. It's necessary, but often intrusive, heavy-handed and cumbersome...or it's anemic and fails to satisfy the needs of Ops and Developers. Whistlepunk doesn't care about what logging tools you love to use. It just cares that it needs to \"blow the whistle\" (i.e. - indicate something should be logged). You can plug your favorite logging tool into whistlepunk by writing an adapter for it (which consists of susbcribing to the postal \"log\" channel and writing the published log messages to your preferred logging library). At LeanKit, we're using [debug]() a lot (during development) and then standard out for production logs - so whistlepunk has two adapters (currently) built-in.\n\n## How Does it Work?\nIf whistlepunk knows about your adapter, then including a section for that adapter in your configuration will enable it. For example, this config enables the \"stdOut\" and \"debug\" built-in adapters:\n\n```javascript\nvar postal = require(\"postal\");\nvar whistlepunk = require(\"whistlepunk\");\n\nvar config =  {\n\tadapters: {\n\t\tstdOut: {\n\t\t\tlevel: 4,\n\t\t\tbailIfDebug: true, // disables stdOut if DEBUG=* is in play\n\t\t\ttimestamp: {\n\t\t\t\tlocal: true, // defaults to UTC\n\t\t\t\tformat: \"MMM-D-YYYY hh:mm:ss A\" // ex: Jan 1, 2015 10:15:20 AM\n\t\t\t},\n\t\t\ttopic: \"#\", // default topic\n\t\t},\n\t\t\"debug\": {\n\t\t\tlevel: 4\n\t\t}\n\t}\n};\n\nvar loggerFactory = whistlepunk(postal, config);\n\nvar logger = loggerFactory();\nlogger.warn(\"Watch it, I'm warning you!\");\n```\n\n### Alternate API\nA common use case we've run into is that multiple modules need logging but a dependency on a shared loggerFactory instance gets cumbersome and introduces limitations in setup due to temporal coupling.\n\nWhistlepunk now provides a singleton log instance that you can provide configuration to even after log instances have been created. Any calls to these uninitialized logs will simply no-op until some configuration has been provided.\n\nThis also supports use cases where you may want to change log configuration during the lifetime of the application.\n\n```javascript\nvar whistlepunk = require(\"whistlepunk\").log;\n\nvar config =  {\n\tadapters: {\n\t\tstdOut: {\n\t\t\tlevel: 5,\n\t\t\tbailIfDebug: true, // disables stdOut if DEBUG=* is in play\n\t\t\ttimestamp: {\n\t\t\t\tlocal: true, // defaults to UTC\n\t\t\t\tformat: \"MMM-D-YYYY hh:mm:ss A\" // ex: Jan 1, 2015 10:15:20 AM\n\t\t\t},\n\t\t\ttopic: \"#\", // default topic\n\t\t},\n\t\t\"debug\": {\n\t\t\tlevel: 5\n\t\t}\n\t}\n};\n\nvar logger = whistlepunk( \"my.topic\" );\nlogger.warn( \"no configuration was provided, no one will see this\" );\nwhistlepunk( config );\nlogger.info( \"now that an adapter was added, this will show up\" );\n\n// creating additional log instances that use different topics\n// is simple and doesn't require you to provide the configuration\n// nor do you need to carry around the same loggerFactory instance.\nvar altLogger = whistlepunk( \"off.topic\" );\naltLogger.info( \"that reminds me ...\" );\n```\n\nAny other module can get access to the same log factory by using `require( \"whistlepunk\" ).log;` and not need to pass around shared references.\n\nThe trade-off for these features is that you _can_ create a race condition in your setup where some log entries could no-op. Careful planning in how you initialize will avoid this problem.\n\n## Configuration\n\n### Log Levels\nThe log levels available are specified as integers (as in the above `level` value under each adapter's configuration). Specifying a log level includes each level up to the level specified. For example, specifying a log level of \"3\" (info), will include warn (2) and error (1) log messages as well.\n\n* 0 - off\n* 1 - error\n* 2 - warn\n* 3 - info\n* 4 - debug\n\n### Topics\nTopics provide a way for adapters to limit what log entries they accept based on the namespace of the logger publishing the log entry. Since `postal` is being used to handle this, AMQP style wildcards are a valid way to subscribe to parts of a namespace.\n\nBe aware that when calling `reset` on a log, all adapter subscriptions that match the log's namespace will be unsubscribed.\n\n__example topics__\n```javascript\n\ttopic: \"#\" // will subscribe to all logs\n\ttopic: \"autohost.#\" // will subscribe to all autohost loggers\n\ttopic: \"#.errors\" // would subscribe to any logger with a namespace ending in \"error\"\n\ttopic: \"myApp.#,autohost.#\" // subscribes to `myApp.#` and `autohost.#`\n\ttopic: [ \"myApp.#\", \"autohost.#\" ] // same as above but\n```\n\n### Timestamps\nWhistlepunk uses moment.js to capture and format timestamps. Timestamps will default to Greenwich Mean Time and the ISO8601 format.\n\n#### Whistlepunk Users\nAdapters should support the `timestamp` property in their configuration. To learn how to provide custom formats for the timestamp in your log entries, see [moment.js](http://momentjs.com/docs/#/displaying/format/).\n\nThe timestamp property has the following properties:\n\n```javascript\n\t{\n\t\tlocal: false, // default setting\n\t\tformat: \"YYYY-MM-DDTHH:mm:ss.SSSZ\" // default setting\n\t}\n```\n\n#### Adapter Authors\nWhistelpunk provides adapters with two fields that can be used to display a timestamp. The `timestamp` field is an ISO8601 string in GMT. The `utc` field is a moment instance in UTC that can be used to apply a user-supplied format.\n\nA timeFormatter function that will adjust and format the timestamp according to the adapter's configuration will be passed to your adapter's constructor. It requires the configuration and data as arguments:\n\n```javascript\nvar timestamp = formatter( config, data );\n```\n\nSee the [stdOut adapter](/blob/master/src/adapters/stdOut.js) for an example use case.\n\n### Using With autohost\nIt's possible to use autohost to emit log messages over websockets to a client. To do so, you need to ensure autohost is registered with its fount instances as \"ah\", and pass the autohost fount instance to whistlepunk:\n\n```javascript\nvar postal = require(\"postal\");\nvar whistlepunk = require(\"whistlepunk\");\n\nvar config =  {\n\tadapters: {\n\t\tstdOut: {\n\t\t\tlevel: 4,\n\t\t\tbailIfDebug: true // disables stdOut if DEBUG=* is in play\n\t\t},\n\t\t\"debug\": {\n\t\t\tlevel: 4\n\t\t},\n\t\tautohost: {\n\t\t\tlevel: 4\n\t\t}\n\t}\n};\n// assuming autohost instance is assigned to a \"host\" variable\nvar loggerFactory = whistlepunk(postal, config, host.fount);\n\nvar logger = loggerFactory();\nlogger.debug(\"More info than you'd typically want to sift through....\");\n```\n\n### Custom Adapters\nWhistlepunk adapters modules must meet the following criteria:\n\n * export a factory method that takes the adapter config\n * provide an onLog method it can call on entries\n * implement a singleton (requiring it multiple times should result in the same instance)\n\nOptionally, your adapter module can:\n\n * provide an init method that returns a promise for asynchronous setup\n * provide a `constraint` predicate that filters log entries (one is provided by default that filters by level)\n * accept a fount instance as a second argument to the factory method\n\n#### Debug adapter - synchronous example\n```js\nvar debug = require( \"debug\" );\nvar namespaces = {};\nvar debugAdapter = {\n\tonLog: function( data ) {\n\t\tvar debugNs = namespaces[ data.namespace ];\n\t\tif ( !debugNs ) {\n\t\t\tdebugNs = namespaces[ data.namespace ] = debug( data.namespace );\n\t\t}\n\t\tdebugNs( data.type, data.msg );\n\t}\n};\n\n// factory method returns the same instance every time\n// this allows whistlepunk to prevent creating duplicate subscriptions\n// which would cause duplicate log entries\nmodule.exports = function( config ) {\n\treturn debugAdapter;\n};\n```\n\n#### Autohost Socket adapter - asynchronous example\n```js\nvar noOpAdapter = { onLog: function() {} };\nvar adapter;\n\nfunction createAhAdapter( fount ) {\n\tvar host;\n\n\treturn {\n\t\t// whistlepunk will call this when present\n\t\t// and cache log messages for this adapter\n\t\t// until the promise resolves\n\t\tinit: function() {\n\t\t\treturn fount.resolve( \"ah\" )\n\t\t\t\t.then( function( _host ) {\n\t\t\t\t\thost = _host;\n\t\t\t\t} );\n\t\t},\n\t\tonLog: function( data ) {\n\t\t\tif ( host && host.notifyClients ) {\n\t\t\t\thost.notifyClients( data.type, data );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// because need fount to get a handle to the\n// autohost instance, return a no-op adapter\n// if it's missing\nmodule.exports = function( config, formatter, fount ) {\n\tadapter = adapter || ( fount ? createAhAdapter( fount ) : noOpAdapter );\n\treturn adapter;\n};\n```\n","readmeFilename":"README.md","gitHead":"5b87fa491c23cd24031e21fe247aac11e0e7ea82","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@0.3.4-update-deps.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-29zh1yAmJj2zbROeuhcTGYqfFIMLf61uYV0ms9QeIGvW0ck9x3B3TOMwhcR8Qf9Byiy7U8/ZsgvnjcPi05huTA==","shasum":"8fd2f4f4ea5dca5491bd37d19a5c6e691768bb09","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-0.3.4-update-deps.0.tgz","fileCount":12,"unpackedSize":20887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3N7xCRA9TVsSAnZWagAAnxYP/R3RP3hr4bbSp4ZqBsgb\nCCYF5gpBbRyC/Nb1yhdVsrmc0yEcxt75ec3Ea/n9FzRkVldl7pmrukp7IDdv\nYkdsTDU/HZPLvZpkdhM9oyNNtUW3aS3fCvB2I9Yy3WMuWnnfCQe7JeI6zFjl\nL1OxPBkoCFqZkPRTKHwWKcHlHnZsBd4f5VZVF9ddawzgvWXgnNTLo5x02eY5\nUrnkWcr2c8gr7VFNFN0bDe2vNFEJRuiP5eVhV6jqZXu+t0ARzpL+Yf7rY789\nzHeLcRcyjYYX0CT+jqGYU+AgybhB+ADv+t6kw53vmtlanWeKhIAswePpFuIv\nLH8Y/LiX1Xu79uBqiSvj9Beqxu2y0cqXx3v45NB36kgk71wue/qgASU7Giyu\nad6etTMyEiI1G/VOSfseeRsKHo+9WGQzCbqXKLZMNNwSXOQSjJYIyUO1xVo9\nh95aWMtyBsypfT9aOvQqygS/LLXnxMjD8+CcF8KABMyPmFkhlEorSnDvKeMR\nEmnL5HZANfo0Egk1zrVvIurspHW8phxbumd/5iSJ96mEduMlynT6TKk23M9L\nxfLPDwD7GA10WbHV3jweIqeUwpKi22WqMPu/GrnWyElETvht+OLcI9DvR7UD\n0Kn6Jds6RnRg7kBdCOrLmdf47/S0uVaNYaoCiZGvd2/A+uyJMsXxlwIdPEG+\nr0Ry\r\n=x25u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1IcET17rmSQA4plpx0BKLE+8YrWOKynfsBYocR0pTqAiAngSgeIC9kqs/lzmE/OD73dsOl5sfrIMBnYjEvhltGEg=="}]},"_npmUser":{"name":"heath101","email":"heath.attig@gmail.com"},"directories":{},"maintainers":[{"name":"johndmathis","email":"john@inplicity.com"},{"name":"ifandelse","email":"jim@ifandelse.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"},{"name":"heath101","email":"heath.attig@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whistlepunk_0.3.4-update-deps.0_1608310512504_0.16841743093172923"},"_hasShrinkwrap":false},"1.0.0":{"name":"whistlepunk","version":"1.0.0","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"},{"name":"Derick Bailey","email":"derickbailey@gmail.com","url":"http://derickbailey.com"},{"name":"Michael Tuttle","url":"https://github.com/openam"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"lint":"eslint --fix ./","pretest":"npm run lint","test:only":"NODE_ENV=test mocha --exit -R spec 'spec/**/*.spec.js'","test:ci":"NODE_ENV=test mocha --exit -R spec 'spec/behavior/**/*.spec.js'","test":"npm run cover","cover":"nyc -r text-summary -r html -- npm run test:only","cover:ci":"nyc -r text-summary -r html -- npm run test:ci","cover:show":"open \"file://$PWD/coverage/index.html\""},"dependencies":{"colors":"1.0.3","debug":"2.4.5","lodash":"4.17.20","machina":"^4.0.2","moment":"^2.29.1","postal":"1.x"},"devDependencies":{"chai":"^2.1.0","dirty-chai":"^2.0.1","eslint-config-leankit":"^6.0.0","mocha":"^8.2.1","nyc":"^15.1.0","open":"^7.3.0","proxyquire":"^1.4.0","sinon":"^2.0.0","sinon-chai":"^2.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"nyc":{"exclude":["config.local.*","coverage","configs","spec",".eslintrc.js"],"sourceMap":false,"instrument":true,"all":true},"gitHead":"d3e35c1237cd25246192a2b2f7dae0cc13d35376","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@1.0.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-2XEnYNDSzto32i8sKgXIZYI8l5vQCQFSfYMcLykuLodmvzZkIapeCCfxDYqy8pi7h9Cppy7m8WpkOcWmwtI1GQ==","shasum":"2294eb01e4cd9827352a92a0f8f44c0744633f37","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-1.0.0.tgz","fileCount":12,"unpackedSize":21134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4et4CRA9TVsSAnZWagAAlB0P/2Hp5Oh8wTJ44+C+5rVt\nQzS6NW9ouLjJrW+W8+wOwjoNc6Tkn+dF/0lFlyuqvdBDjQ4tOADgr8eQj8VJ\nR7EJvBTZoJGBqD/80AlYlx8pYCn+66sIZgQJ0y7lDLibDNX/vjeJQ6a1Ta/M\nfLTAu76vS7+nlqvmQb3FKKXKnkMga4PuN5FuV48jIsD850GN6kg5U8RCicbV\nP6Yy9Rp0UwOaKwzpMolvH++GVrzhVGtcXids9fpgH6PEaqRknnVm0FdEzAh6\nZspixMGa8PNPypYJwBFjTadv9MA6xAvrbNUcjZ7ETQOLi41nLrg+fprhVwwv\nmG41o5ApvnaI8N4UJ9mL4e7l4fbG6BPB/JYspEUhqZyVU/Kin2X/xUicML3E\nH1zbWmGNhP1q+CsSOvYByd4/7zwNQKjttxjyc2rXRXUwBL2rgs+01LrYZdHJ\nZ0U8l5tJy9eZ/bQ9jMiiixk4QmgGbvEUPcNygex4twZwIbKEA2riE/0gesRS\nuL0bzI0tojtg1PR7mfszj84HxIlXfPcdlH1l4R3nz2BoftGxquseYKnEVphc\nzSxqkP8tQB1P83q4nlNj0rNFkPXIQXsJU0vopbgA3nsmm1WeEO8G5ul2g/Dq\nhuoxUrlovltqF6cUO9BTZdGOlaAJz2l+1x4d+DK7bXpcBWYIySIOtFG6O11Z\ne9Q9\r\n=F2yH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNUm0RwViL9uHB+E5G5kgqCMnFc10rmQnbapYAgzXw3AiEAp0TEcKD9IjHErrxFqXR2CmmaXnmPY5PDcTu2BBvjmLw="}]},"_npmUser":{"name":"heath101","email":"heath.attig@gmail.com"},"directories":{},"maintainers":[{"name":"johndmathis","email":"john@inplicity.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"},{"name":"heath101","email":"heath.attig@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whistlepunk_1.0.0_1608641399994_0.858142414322022"},"_hasShrinkwrap":false},"2.0.0":{"name":"whistlepunk","version":"2.0.0","homepage":"https://github.com/LeanKit-Labs/whistlepunk","description":"Logging abstraction that signals any enabled adapters of a new log message.","author":{"name":"LeanKit"},"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"},{"name":"Derick Bailey","email":"derickbailey@gmail.com","url":"http://derickbailey.com"},{"name":"Michael Tuttle","url":"https://github.com/openam"}],"keywords":["logging","log","bunyan","debug"],"scripts":{"lint":"eslint --fix ./","pretest":"npm run lint","test:only":"NODE_ENV=test mocha --exit -R spec 'spec/**/*.spec.js'","test:ci":"NODE_ENV=test mocha --exit -R spec 'spec/behavior/**/*.spec.js'","test":"npm run cover","cover":"nyc -r text-summary -r html -- npm run test:only","cover:ci":"nyc -r text-summary -r html -- npm run test:ci","cover:show":"open \"file://$PWD/coverage/index.html\""},"dependencies":{"colors":"^1.4.0","debug":"^4.3.4","lodash":"^4.17.21","machina":"^4.0.2","moment":"^2.29.4","postal":"^2.0.6"},"devDependencies":{"chai":"^4.3.6","dirty-chai":"^2.0.1","eslint-config-leankit":"^6.0.0","mocha":"^10.1.0","nyc":"^15.1.0","proxyquire":"^2.1.3","sinon":"^14.0.1","sinon-chai":"^3.7.0"},"engines":{"node":">=0.10.0"},"main":"src/index.js","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"nyc":{"exclude":["config.local.*","coverage","configs","spec",".eslintrc.js"],"sourceMap":false,"instrument":true,"all":true},"gitHead":"461a36d70f9ef92e8a20466ef16f8fb9dbc326ed","bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"_id":"whistlepunk@2.0.0","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-sGpgi8fo1UiZaAA5TGJMzA6+7bPn031w1Hk7sQnU2Ce+58JsSaMEo7OjKlcmoR9UezMSZKHWLVuEfNspvYS2AA==","shasum":"a9045e857690790c998128cae027acdbd62edb62","tarball":"https://registry.npmjs.org/whistlepunk/-/whistlepunk-2.0.0.tgz","fileCount":11,"unpackedSize":19715,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFh8m5lzuPhEx5k0nyaLcjp/gnGJrn2A2u1OU8rovKEIAiBUbaRUOBwW628361qVca5RXsjkauSSWX1pfm3H9SnkjQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYSq2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXsg/+J8VGSLd6dpEYTO/ET/veFOwmRL1MaN/3NUrWD4s78mi2n3BS\r\nu/XIO6CW0O0Kbkt6/XBDq1/c09K5BT7IbwkcZZZ+1wf8HLQPGujC7dsccrNA\r\nvnblQ/Xw+90aGZZEyNr7TwV9FL3/2f3RGI8RJLuP3mKCpKwKff9Yv8+FZ5NW\r\nAhkPZKbbc2K4KjWYyivr6jZIDBQTBzxQfNDf9lP6wGlxnVNFwb4lig3fZigg\r\ndCLlUOwfiUTc6K3YxgLezc/ctFCgRqsnTbk1j/gbzrs7pRmrxZP1zvxK7+uU\r\nEhEAO3HshGB7CW5Rs+zazu7MZrsxr7ut/hC3piRkr91/IpxwJ5MdwvtpkSq+\r\nV4qJMSQzmIjCM1M4seE8jXHJh6AZJhckekR0dRg+udkRZt9qb9D67I2MPWl4\r\nI9hqNZ81Ubk4TymSQjaQCvWIcpzWMAYMSV05OGTKtQ5/TLi02lx5fNAeJjR/\r\nPnpyd3qObwk6iuYSbHY5zvPUpcNJlegn5v80/gEVN1BC4nTIW/9YAPbrPAjl\r\nlZVRnE6zhcBHg3gclm8GtYw6UUJZnBRjlYw5amoWLNo+TjxWlU8nmnKSy2SG\r\nHmposYh6ADHcJk9eF1ZnbGme/aj+BuRh7COd0zFdzYQPC2iwcBw1eQP48vCC\r\n6aE6X51rYPynucJZuo5VVxeyw0l78Dm3OT4=\r\n=ZrEr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"johndmathis","email":"john@inplicity.com"},"directories":{},"maintainers":[{"name":"johndmathis","email":"john@inplicity.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"},{"name":"heath101","email":"heath.attig@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whistlepunk_2.0.0_1667312310198_0.3835434159967481"},"_hasShrinkwrap":false}},"readme":"# Whistlepunk\n\n[![Version npm](https://img.shields.io/npm/v/whistlepunk.svg?style=flat)](https://www.npmjs.com/package/whistlepunk)\n[![npm Downloads](https://img.shields.io/npm/dm/whistlepunk.svg?style=flat)](https://www.npmjs.com/package/whistlepunk)\n[![Dependencies](https://img.shields.io/david/LeanKit-Labs/whistlepunk.svg?style=flat)](https://david-dm.org/LeanKit-Labs/whistlepunk)\n\n> *noun* - a lumberjack who operates the signal wire running to a donkey engine whistle.\n\n## What Is It?\nLogging.....sigh. It's necessary, but often intrusive, heavy-handed and cumbersome...or it's anemic and fails to satisfy the needs of Ops and Developers. Whistlepunk doesn't care about what logging tools you love to use. It just cares that it needs to \"blow the whistle\" (i.e. - indicate something should be logged). You can plug your favorite logging tool into whistlepunk by writing an adapter for it (which consists of susbcribing to the postal \"log\" channel and writing the published log messages to your preferred logging library). At LeanKit, we're using [debug]() a lot (during development) and then standard out for production logs - so whistlepunk has two adapters (currently) built-in.\n\n## How Does it Work?\nIf whistlepunk knows about your adapter, then including a section for that adapter in your configuration will enable it. For example, this config enables the \"stdOut\" and \"debug\" built-in adapters:\n\n```javascript\nvar postal = require(\"postal\");\nvar whistlepunk = require(\"whistlepunk\");\n\nvar config =  {\n\tadapters: {\n\t\tstdOut: {\n\t\t\tlevel: 4,\n\t\t\tbailIfDebug: true, // disables stdOut if DEBUG=* is in play\n\t\t\ttimestamp: {\n\t\t\t\tlocal: true, // defaults to UTC\n\t\t\t\tformat: \"MMM-D-YYYY hh:mm:ss A\" // ex: Jan 1, 2015 10:15:20 AM\n\t\t\t},\n\t\t\ttopic: \"#\", // default topic\n\t\t},\n\t\t\"debug\": {\n\t\t\tlevel: 4\n\t\t}\n\t}\n};\n\nvar loggerFactory = whistlepunk(postal, config);\n\nvar logger = loggerFactory();\nlogger.warn(\"Watch it, I'm warning you!\");\n```\n\n### Alternate API\nA common use case we've run into is that multiple modules need logging but a dependency on a shared loggerFactory instance gets cumbersome and introduces limitations in setup due to temporal coupling.\n\nWhistlepunk now provides a singleton log instance that you can provide configuration to even after log instances have been created. Any calls to these uninitialized logs will simply no-op until some configuration has been provided.\n\nThis also supports use cases where you may want to change log configuration during the lifetime of the application.\n\n```javascript\nvar whistlepunk = require(\"whistlepunk\").log;\n\nvar config =  {\n\tadapters: {\n\t\tstdOut: {\n\t\t\tlevel: 5,\n\t\t\tbailIfDebug: true, // disables stdOut if DEBUG=* is in play\n\t\t\ttimestamp: {\n\t\t\t\tlocal: true, // defaults to UTC\n\t\t\t\tformat: \"MMM-D-YYYY hh:mm:ss A\" // ex: Jan 1, 2015 10:15:20 AM\n\t\t\t},\n\t\t\ttopic: \"#\", // default topic\n\t\t},\n\t\t\"debug\": {\n\t\t\tlevel: 5\n\t\t}\n\t}\n};\n\nvar logger = whistlepunk( \"my.topic\" );\nlogger.warn( \"no configuration was provided, no one will see this\" );\nwhistlepunk( config );\nlogger.info( \"now that an adapter was added, this will show up\" );\n\n// creating additional log instances that use different topics\n// is simple and doesn't require you to provide the configuration\n// nor do you need to carry around the same loggerFactory instance.\nvar altLogger = whistlepunk( \"off.topic\" );\naltLogger.info( \"that reminds me ...\" );\n```\n\nAny other module can get access to the same log factory by using `require( \"whistlepunk\" ).log;` and not need to pass around shared references.\n\nThe trade-off for these features is that you _can_ create a race condition in your setup where some log entries could no-op. Careful planning in how you initialize will avoid this problem.\n\n## Configuration\n\n### Log Levels\nThe log levels available are specified as integers (as in the above `level` value under each adapter's configuration). Specifying a log level includes each level up to the level specified. For example, specifying a log level of \"3\" (info), will include warn (2) and error (1) log messages as well.\n\n* 0 - off\n* 1 - error\n* 2 - warn\n* 3 - info\n* 4 - debug\n\n### Topics\nTopics provide a way for adapters to limit what log entries they accept based on the namespace of the logger publishing the log entry. Since `postal` is being used to handle this, AMQP style wildcards are a valid way to subscribe to parts of a namespace.\n\nBe aware that when calling `reset` on a log, all adapter subscriptions that match the log's namespace will be unsubscribed.\n\n__example topics__\n```javascript\n\ttopic: \"#\" // will subscribe to all logs\n\ttopic: \"autohost.#\" // will subscribe to all autohost loggers\n\ttopic: \"#.errors\" // would subscribe to any logger with a namespace ending in \"error\"\n\ttopic: \"myApp.#,autohost.#\" // subscribes to `myApp.#` and `autohost.#`\n\ttopic: [ \"myApp.#\", \"autohost.#\" ] // same as above but\n```\n\n### Timestamps\nWhistlepunk uses moment.js to capture and format timestamps. Timestamps will default to Greenwich Mean Time and the ISO8601 format.\n\n#### Whistlepunk Users\nAdapters should support the `timestamp` property in their configuration. To learn how to provide custom formats for the timestamp in your log entries, see [moment.js](http://momentjs.com/docs/#/displaying/format/).\n\nThe timestamp property has the following properties:\n\n```javascript\n\t{\n\t\tlocal: false, // default setting\n\t\tformat: \"YYYY-MM-DDTHH:mm:ss.SSSZ\" // default setting\n\t}\n```\n\n#### Adapter Authors\nWhistelpunk provides adapters with two fields that can be used to display a timestamp. The `timestamp` field is an ISO8601 string in GMT. The `utc` field is a moment instance in UTC that can be used to apply a user-supplied format.\n\nA timeFormatter function that will adjust and format the timestamp according to the adapter's configuration will be passed to your adapter's constructor. It requires the configuration and data as arguments:\n\n```javascript\nvar timestamp = formatter( config, data );\n```\n\nSee the [stdOut adapter](/blob/master/src/adapters/stdOut.js) for an example use case.\n\n### Using With autohost\nIt's possible to use autohost to emit log messages over websockets to a client. To do so, you need to ensure autohost is registered with its fount instances as \"ah\", and pass the autohost fount instance to whistlepunk:\n\n```javascript\nvar postal = require(\"postal\");\nvar whistlepunk = require(\"whistlepunk\");\n\nvar config =  {\n\tadapters: {\n\t\tstdOut: {\n\t\t\tlevel: 4,\n\t\t\tbailIfDebug: true // disables stdOut if DEBUG=* is in play\n\t\t},\n\t\t\"debug\": {\n\t\t\tlevel: 4\n\t\t},\n\t\tautohost: {\n\t\t\tlevel: 4\n\t\t}\n\t}\n};\n// assuming autohost instance is assigned to a \"host\" variable\nvar loggerFactory = whistlepunk(postal, config, host.fount);\n\nvar logger = loggerFactory();\nlogger.debug(\"More info than you'd typically want to sift through....\");\n```\n\n### Custom Adapters\nWhistlepunk adapters modules must meet the following criteria:\n\n * export a factory method that takes the adapter config\n * provide an onLog method it can call on entries\n * implement a singleton (requiring it multiple times should result in the same instance)\n\nOptionally, your adapter module can:\n\n * provide an init method that returns a promise for asynchronous setup\n * provide a `constraint` predicate that filters log entries (one is provided by default that filters by level)\n * accept a fount instance as a second argument to the factory method\n\n#### Debug adapter - synchronous example\n```js\nvar debug = require( \"debug\" );\nvar namespaces = {};\nvar debugAdapter = {\n\tonLog: function( data ) {\n\t\tvar debugNs = namespaces[ data.namespace ];\n\t\tif ( !debugNs ) {\n\t\t\tdebugNs = namespaces[ data.namespace ] = debug( data.namespace );\n\t\t}\n\t\tdebugNs( data.type, data.msg );\n\t}\n};\n\n// factory method returns the same instance every time\n// this allows whistlepunk to prevent creating duplicate subscriptions\n// which would cause duplicate log entries\nmodule.exports = function( config ) {\n\treturn debugAdapter;\n};\n```\n\n#### Autohost Socket adapter - asynchronous example\n```js\nvar noOpAdapter = { onLog: function() {} };\nvar adapter;\n\nfunction createAhAdapter( fount ) {\n\tvar host;\n\n\treturn {\n\t\t// whistlepunk will call this when present\n\t\t// and cache log messages for this adapter\n\t\t// until the promise resolves\n\t\tinit: function() {\n\t\t\treturn fount.resolve( \"ah\" )\n\t\t\t\t.then( function( _host ) {\n\t\t\t\t\thost = _host;\n\t\t\t\t} );\n\t\t},\n\t\tonLog: function( data ) {\n\t\t\tif ( host && host.notifyClients ) {\n\t\t\t\thost.notifyClients( data.type, data );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// because need fount to get a handle to the\n// autohost instance, return a no-op adapter\n// if it's missing\nmodule.exports = function( config, formatter, fount ) {\n\tadapter = adapter || ( fount ? createAhAdapter( fount ) : noOpAdapter );\n\treturn adapter;\n};\n```\n","maintainers":[{"name":"johndmathis","email":"john@inplicity.com"},{"name":"arobson","email":"asrobson@gmail.com"},{"name":"brian_edgerton","email":"brian.edgerton@leankit.com"},{"name":"dougneiner","email":"doug@dougneiner.com"},{"name":"heath101","email":"heath.attig@gmail.com"}],"time":{"modified":"2022-11-01T14:18:30.490Z","created":"2015-01-07T04:13:21.013Z","0.0.1":"2015-01-07T04:13:21.013Z","0.1.0":"2015-01-23T02:06:50.672Z","0.2.0":"2015-02-10T20:00:21.933Z","0.2.1":"2015-03-19T17:12:47.726Z","0.3.0":"2015-04-06T05:26:01.685Z","0.3.1":"2015-04-15T16:30:57.022Z","0.3.2":"2015-12-12T13:06:12.075Z","0.3.3":"2015-12-15T17:45:47.422Z","0.3.4-update-deps.0":"2020-12-18T16:55:12.693Z","1.0.0":"2020-12-22T12:50:00.116Z","2.0.0":"2022-11-01T14:18:30.418Z"},"homepage":"https://github.com/LeanKit-Labs/whistlepunk","keywords":["logging","log","bunyan","debug"],"repository":{"type":"git","url":"git://github.com/LeanKit-Labs/whistlepunk.git"},"contributors":[{"name":"Jim Cowart","email":"jim@ifandelse.com","url":"http://ifandelse.com"},{"name":"Alex Robson","email":"WhyNotJustComment@OnMyBlog.com","url":"http://nerdventure.io/"},{"name":"Brian Edgerton","url":"https://github.com/brianedgerton"},{"name":"Derick Bailey","email":"derickbailey@gmail.com","url":"http://derickbailey.com"},{"name":"Michael Tuttle","url":"https://github.com/openam"}],"author":{"name":"LeanKit"},"bugs":{"url":"https://github.com/LeanKit-Labs/whistlepunk/issues"},"readmeFilename":"README.md"}