{"_id":"@cofacts/line-bot-log-parser","_rev":"2-d24d4ec6e58a7eecf2e631c76896861a","name":"@cofacts/line-bot-log-parser","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@cofacts/line-bot-log-parser","version":"0.0.1","description":"Parses the STDOUT logs emitted by rumors-line-bot","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cofacts/rumors-line-bot-log-parser.git"},"author":{"name":"MrOrz"},"license":"MIT","bugs":{"url":"https://github.com/cofacts/rumors-line-bot-log-parser/issues"},"homepage":"https://github.com/cofacts/rumors-line-bot-log-parser#readme","dependencies":{"csv-stringify":"^3.1.1","glob":"^7.1.3"},"devDependencies":{"eslint":"^5.2.0","eslint-config-prettier":"^2.9.0","eslint-plugin-import":"^2.13.0","eslint-plugin-prettier":"^2.6.2","jest":"^26.0.1","prettier":"^1.13.7"},"gitHead":"5446ec86976e4c55f24fd355fe595a45da5f31e2","_id":"@cofacts/line-bot-log-parser@0.0.1","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-l4DRp+ECtwb2qC9wanHo96iRm4eN0CT47Kwd7Vy2qytVIDGnvMsGg50ZuBG72sKsxvf8mywaNIedOTRDOpjidw==","shasum":"070945abf40619505eb78d1e5ea3e2cb56133721","tarball":"https://registry.npmjs.org/@cofacts/line-bot-log-parser/-/line-bot-log-parser-0.0.1.tgz","fileCount":9,"unpackedSize":19308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7l3bCRA9TVsSAnZWagAAW4sP/i+T7f4SD9x3D4RwbaDL\nm7qZ9Ol8hjm0Wl493KAazRIQE1IB1YmG35/IElY+SFQh8E5NG61iRFECQpbX\nQW5Z/uD4NmCvbf68AbVzQhZUc3YL3Gh7TMQ+vhB/6NPKr3lfyyyD/wMO0Ppa\nwSBabmhMXCmLQmX/T+PnHxGINeJjj1OM9FBYMSsF4O9TgfmPv+9nyjDECg7V\nePdka761oC/8oE25K4eCyzRIKEBHKmU1Fih8wTspDmPTxJc0yIBCBALn+P8z\nzxj591aPERAMFvFyKJ3+z14gfdtmzOKbbg8mRdk5bD+wUYFtTJQ1DLbuwNID\ny6kET7bsnDeFVCilMpdaXEyA0VcLenj7Sg2q2S1JZbu0nekFxiYQMP5RB3vl\nmF1rJLNV7oISIs3PLILFZI4hc/UPMsI5TgzBcXaJ6awRiYhNWZKh3L8zN4K+\nqtx1bRG28V3joJInN9WuEvKlQ6LkwrIOG8BAi3jiCYdDJCLluMhWLVwxzcDC\n7gZZ127/kDbQgEh5z2sBr3euJOdyprzuH7WN9xSuAvr4z5RXqevJ62VJfwbj\nEEmFjZk7tRn3iSNrWtW1kAxJehhpLnX0BnCwp8gHBJvyexCgKZeywpSTi/S8\nW4uMFVwMm2YgM31lNrAppDnqwwh0dk285+jWw5P1u8cZVquowL5FtrbAHVHD\nPovA\r\n=apnI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq9wwa40qThHFLPSV8U+s+fJ2Pkc3nW6QqRDNuvmKccwIhAOr3UsxDZJQGzjY9jX3XVPjfcZXgjpDxAVQBgDr+u90E"}]},"maintainers":[{"name":"nonumpa","email":"acerxp511@gmail.com"},{"name":"darkbtf","email":"darkbtf@gmail.com"},{"name":"lucienlee","email":"lucien@lucienlee.cc"},{"name":"godgunman","email":"godgunman@gmail.com"}],"_npmUser":{"name":"godgunman","email":"godgunman@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/line-bot-log-parser_0.0.1_1592679899008_0.21695393569735755"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-20T19:04:58.745Z","0.0.1":"2020-06-20T19:04:59.175Z","modified":"2022-06-05T09:54:56.033Z"},"maintainers":[{"email":"johnsonliang7@gmail.com","name":"mrorz"},{"email":"godgunman@gmail.com","name":"godgunman"},{"email":"lucien@lucienlee.cc","name":"lucienlee"},{"email":"darkbtf@gmail.com","name":"darkbtf"},{"email":"acerxp511@gmail.com","name":"nonumpa"}],"description":"Parses the STDOUT logs emitted by rumors-line-bot","homepage":"https://github.com/cofacts/rumors-line-bot-log-parser#readme","repository":{"type":"git","url":"git+https://github.com/cofacts/rumors-line-bot-log-parser.git"},"author":{"name":"MrOrz"},"bugs":{"url":"https://github.com/cofacts/rumors-line-bot-log-parser/issues"},"license":"MIT","readme":"# rumors-line-bot-log-parser\nParses the STDOUT logs emitted by rumors-line-bot\n\n## Usage\n\n```bash\n$ node index.js <Input file / glob> <output csv>\n```\n\n```javascript\nconst { parseToJson } = require('@cofacts/line-bot-log-parser');\n\nconst path = 'path/to/201709/01/05/3022.69933758693960.log'\n// or 'path/to/201709/**/*.log'\nparseToJson(path, (data, next) => {\n    console.log(data)\n    next();\n  }, { sequential: true }\n);\n```\n\n## Input file\n\nIt supports 2 formats:\n\n### Logentries format (Heroku mode)\n\nShould be a text file including something like:\n\n```\n112 <190>1 2018-07-16T17:37:36.459659+00:00 app web.1 - - ||LOG||<----------\n(some content...)\n112 <190>1 2018-07-16T17:37:36.465389+00:00 app web.1 - - ||LOG||---------->\n```\n\nTo parse this format, please use `HEROKU=1 node index.js .....`\n\n### [Heroku Log S3](https://github.com/choonkeat/heroku-log-s3)\n\nThe log drain has the following configuration:\n- `FILTER_PREFIX`: `||LOG||`\n\nThe logs are stored in the following nested directory structure:\n\n```\n# YearMonth / Day / Hour / MinSecond.Subseconds.log\n201709/01/05/0308.70025261277880.log\n```\n","readmeFilename":"README.md"}