{"_id":"4log","_rev":"4-db9cf653925dedf75aaa629386fb7c22","name":"4log","description":"Line, HTTP Response and Error logger","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"4log","version":"0.1.0","description":"Line, HTTP Response and Error logger","license":"MIT","repository":{"type":"git","url":"git+https://github.com/maxvipon/4log.git"},"author":{"name":"Maxim Ponomarev","email":"maxvipon@gmail.ru","url":"github.com/maxvipon"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["log","logger"],"dependencies":{"datef":"^3.0.0","pff":"^1.0.0"},"devDependencies":{"ava":"^0.15.2","xo":"^0.16.0"},"gitHead":"183b342557a7d2761b4327d2c63e79475e5a4fa7","bugs":{"url":"https://github.com/maxvipon/4log/issues"},"homepage":"https://github.com/maxvipon/4log#readme","_id":"4log@0.1.0","_shasum":"557b4accb6e78a105428aa75d98d6c1f0c8ade92","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"maxvipon","email":"maxvipon@gmail.com"},"maintainers":[{"name":"maxvipon","email":"maxvipon@gmail.com"}],"dist":{"shasum":"557b4accb6e78a105428aa75d98d6c1f0c8ade92","tarball":"https://registry.npmjs.org/4log/-/4log-0.1.0.tgz","integrity":"sha512-XdZQSiuu8MC5HXzzYX2/hIDMLeZEB0oWPvylZdjWvS55giGmED/Id+UFQcYIq+L5mkXdwhJytYdE+2ZAHPWwLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/2eb8GX5H8D2Y6+xktdm2m8iQe4i7Y0GUZbFbBptxNAIgKzSTR5kZt1ocUPutk80zJ9VOQbM3EFeA1GbPU+/rspU="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/4log-0.1.0.tgz_1473671662421_0.5271052171010524"}},"0.1.1":{"name":"4log","version":"0.1.1","description":"Line, HTTP Response and Error logger","license":"MIT","repository":{"type":"git","url":"git+https://github.com/maxvipon/4log.git"},"author":{"name":"Maxim Ponomarev","email":"maxvipon@gmail.ru","url":"github.com/maxvipon"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["log","logger"],"dependencies":{"datef":"^3.0.0","pff":"^1.0.0"},"devDependencies":{"ava":"^0.15.2","xo":"^0.16.0"},"gitHead":"9ddf6db0d4573d69e593e0ccf75a400fc935cdde","bugs":{"url":"https://github.com/maxvipon/4log/issues"},"homepage":"https://github.com/maxvipon/4log#readme","_id":"4log@0.1.1","_shasum":"bda6f292da69357ea4ee8cba08224d19adddace6","_from":".","_npmVersion":"2.15.9","_nodeVersion":"6.3.1","_npmUser":{"name":"maxvipon","email":"maxvipon@gmail.com"},"maintainers":[{"name":"maxvipon","email":"maxvipon@gmail.com"}],"dist":{"shasum":"bda6f292da69357ea4ee8cba08224d19adddace6","tarball":"https://registry.npmjs.org/4log/-/4log-0.1.1.tgz","integrity":"sha512-1ledPt19EHG2cU2SGxNIVDrVLTnCBQhHcpoiJC28proUG/2lfPgOKjGoHNM+pmo5fP72UxWPUjSs+SVs53ytOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6iydCBUr8bStCmjWJQljac07qg3GPBjNp5nYPMTdx+QIhAMNELnyjKecZf7ScQw+O8A9TGLs5STY8h1eG7Mst9M0U"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/4log-0.1.1.tgz_1482490796849_0.814894751412794"}}},"readme":"# 4log [![Build Status](https://travis-ci.org/maxvipon/4log.svg?branch=master)](https://travis-ci.org/maxvipon/4log)\n\n> Line, HTTP Response and Error logger\n\n\n## Install\n\n```\n$ npm install --save 4log\n```\n\n\n## Usage\n\n```js\nconst log = require('4log')('ctrl:index');\n\nlog.msg('unicorns');\n// Format: [datetime] [pid] type who \"message\"\n// => [12/Sep/2016:11:56:51 +0500] [74640] MSG ctrl:index \"unicorns\"\n\nlog.err(new Error('foobar'));\n// Format: [datetime] [pid] type who \"message\" \"stack\"\n// => [12/Sep/2016:09:53:28 +0300] [74640] ERR ctrl:index \"ERROR:  index returned tuples in wrong order\" \"Error: ERROR:  index returned tuples in wrong order >>  >>     at Client._readError (/node_modules/pg-native/index.js:80:13) >>     at Client._read (/node_modules/pg-native/index.js:121:19) >>     at PQ.emit (events.js:104:17)\"\n\nlog.res(res);\n// format: [datetime] [pid] type who IP \"method url\" status \"message\" \"request_id\"\n// => [12/Sep/2016:11:34:00 +0300] [74640] RES ctrl:index 2a02:6b8:0:1625::6 \"GET /v1/locations/foobar\" 404 \"Unsupported location\" \"7b5f10be25e111b2483f2b7e856feeac\"\n```\n\n\n## API\n\n### log(name[, outStream[, errStream]])\n\n#### name\n\nType: `String`\n\nName of the Logger instance.\n\n#### outStream\n\nType: `Stream`<br>\nDefault: `stdout`\n\nWritable stream for MSG and RES logs.\n\n#### errStream\n\nType: `Stream`<br>\nDefault: `stderr`\n\nWritable stream for ERR logs.\n\n### log.msg(str[, arg1[, arg2,[ … argN]]])\n\n#### str\n\nType: `String`\n\nSting for log. It may contain formatters `%s` or `%d` similar to `console.log`\n\n### log.err(err)\n\n#### err\n\nType: `Error`\n\n### log.res(res[, err])\n\n#### res\n\nType: `Response`\n\nExpress Response.\n\n#### err\n\nType: `Error`\n\nError for logging response error.\n\n## License\n\nMIT © [Maxim Ponomarev](https://github.com/maxvipon)\n","maintainers":[{"name":"maxvipon","email":"maxvipon@gmail.com"}],"time":{"modified":"2022-06-12T14:07:50.887Z","created":"2016-09-12T09:14:24.444Z","0.1.0":"2016-09-12T09:14:24.444Z","0.1.1":"2016-12-23T10:59:58.991Z"},"homepage":"https://github.com/maxvipon/4log#readme","keywords":["log","logger"],"repository":{"type":"git","url":"git+https://github.com/maxvipon/4log.git"},"author":{"name":"Maxim Ponomarev","email":"maxvipon@gmail.ru","url":"github.com/maxvipon"},"bugs":{"url":"https://github.com/maxvipon/4log/issues"},"license":"MIT","readmeFilename":"readme.md"}