{"versions":{"2.1.1":{"name":"@devicefarmer/adbkit-logcat","version":"2.1.1","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/devicefarmer/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"The OpenSTF Project","email":"contact@devicefarmer.com","url":"https://devicefarmer,com"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/devicefarmer/adbkit-logcat.git"},"scripts":{"compile":"tsc -p .","format":"eslint ./lib --fix --ext .ts","lint":"eslint ./ --ext .ts","prepublish":"npm run compile && npm run test","test":"mocha --recursive"},"dependencies":{},"devDependencies":{"@types/node":"^14.11.10","@typescript-eslint/eslint-plugin":"^4.4.1","@typescript-eslint/parser":"^4.4.1","chai":"^4.3.3","eslint":"^7.11.0","eslint-config-prettier":"^8.0.0","eslint-plugin-prettier":"^3.1.4","eslint-plugin-progress":"0.0.1","mocha":"^8.3.1","prettier":"^2.1.2","sinon":"^1.17.5","sinon-chai":"^2.8.0","typescript":"^4.0.3"},"engines":{"node":">= 4"},"types":"./index.d.ts","gitHead":"31b13f15786ca999eea8c2a2eb9de8c6baef7392","homepage":"https://github.com/devicefarmer/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@2.1.1","_nodeVersion":"12.21.0","_npmVersion":"6.14.11","dist":{"shasum":"7d66c288220a0c0b55ae8f695073a2955e826a7c","size":8053,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-2.1.1.tgz","integrity":"sha512-Wu9g/P6QatOtCr7D/HjjIN84Q6XhAOZLGf941HR2SMWZI7B/WwzxMpUSQN/d/lZT8qcxmH40X16p6GxQnlI6LQ=="},"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_2.1.1_1615215774164_0.32341160524598345"},"_hasShrinkwrap":false,"publish_time":1615215774362,"_cnpm_publish_time":1615215774362,"_cnpmcore_publish_time":"2021-12-18T20:40:18.172Z","contributors":[]},"2.1.0":{"name":"@devicefarmer/adbkit-logcat","version":"2.1.0","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/devicefarmer/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"The OpenSTF Project","email":"contact@devicefarmer.com","url":"https://devicefarmer,com"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/devicefarmer/adbkit-logcat.git"},"scripts":{"compile":"tsc -p .","format":"eslint ./lib --fix --ext .ts","lint":"eslint ./ --ext .ts","prepublish":"npm run compile && npm run test","test":"mocha --recursive"},"dependencies":{},"devDependencies":{"@types/node":"^14.11.10","@typescript-eslint/eslint-plugin":"^4.4.1","@typescript-eslint/parser":"^4.4.1","chai":"^4.3.3","eslint":"^7.11.0","eslint-config-prettier":"^8.0.0","eslint-plugin-prettier":"^3.1.4","eslint-plugin-progress":"0.0.1","mocha":"^8.3.1","prettier":"^2.1.2","sinon":"^1.17.5","sinon-chai":"^2.8.0","typescript":"^4.0.3"},"engines":{"node":">= 4"},"types":"./index.d.ts","gitHead":"e842eac81bc790584d8dd45e0741c064acafaafe","homepage":"https://github.com/devicefarmer/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@2.1.0","_nodeVersion":"12.21.0","_npmVersion":"6.14.11","dist":{"shasum":"f68a8faf78570be205baccc0d4e6c9b08fedd416","size":8050,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-2.1.0.tgz","integrity":"sha512-ox5arz+TweJccQjUnuUsx3yWPP2nKGTrqNw5BLW9nd7qbNn9tHGXiE/xjwJrJaFxUV+zKpDThZOmGDLCA5985w=="},"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_2.1.0_1615197755489_0.4147720606401635"},"_hasShrinkwrap":false,"publish_time":1615197755668,"_cnpm_publish_time":1615197755668,"_cnpmcore_publish_time":"2021-12-18T20:40:18.463Z","contributors":[]},"1.1.0":{"name":"@devicefarmer/adbkit-logcat","version":"1.1.0","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/openstf/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"The OpenSTF Project","email":"contact@openstf.io","url":"https://openstf.io"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/openstf/adbkit-logcat.git"},"scripts":{"postpublish":"grunt clean","prepublish":"grunt coffee","test":"grunt test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","coffee-script":"^1.10.0","grunt":"^1.0.1","grunt-cli":"^1.2.0","grunt-coffeelint":"0.0.16","grunt-contrib-clean":"^1.0.0","grunt-contrib-coffee":"^1.0.0","grunt-contrib-watch":"^1.0.0","grunt-exec":"^1.0.0","grunt-jsonlint":"^1.1.0","grunt-notify":"^0.4.5","mocha":"^3.0.2","sinon":"^1.17.5","sinon-chai":"^2.8.0"},"engines":{"node":">= 0.10.4"},"gitHead":"7a3321703d08158da90762946deb79606a7d463c","homepage":"https://github.com/openstf/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@1.1.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"shasum":"866d3406dc9f3791446adfe3ae622ffc48607db4","size":6479,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-1.1.0.tgz","integrity":"sha512-K90P5gUXM/w+yzLvJIRQ+tJooNU6ipUPPQkljtPJ0laR66TGtpt4Gqsjm0n9dPHK1W5KGgU1R5wnCd6RTSlPNA=="},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"}],"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_1.1.0_1589633889639_0.6482327276359203"},"_hasShrinkwrap":false,"publish_time":1589633889763,"_cnpm_publish_time":1589633889763,"_cnpmcore_publish_time":"2021-12-18T20:40:18.714Z","contributors":[]},"1.0.1":{"name":"@devicefarmer/adbkit-logcat","version":"1.0.1","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/CyberAgent/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"CyberAgent, Inc.","email":"npm@cyberagent.co.jp","url":"http://www.cyberagent.co.jp/"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/CyberAgent/adbkit-logcat.git"},"scripts":{"postpublish":"grunt clean","prepublish":"grunt coffee","test":"grunt test"},"dependencies":{"async":"~0.2.9"},"devDependencies":{"chai":"~1.8.1","coffee-script":"~1.6.3","grunt":"~0.4.1","grunt-cli":"~0.1.11","grunt-coffeelint":"~0.0.7","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.7.0","grunt-contrib-watch":"~0.5.3","grunt-exec":"~0.4.2","grunt-jsonlint":"~1.0.2","grunt-notify":"~0.2.16","mocha":"~1.14.0","sinon":"~1.7.3","sinon-chai":"~2.4.0"},"engines":{"node":">= 0.10.4"},"gitHead":"cc8cb1f567463816c3190413973ca62f2143efc3","homepage":"https://github.com/CyberAgent/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@1.0.1","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"shasum":"d45d88f5aabb05581d37c7e67a6e31636aab50ca","size":6408,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-1.0.1.tgz","integrity":"sha512-hFLOMvYtyhBpzP1L9IZJ+1eRqmbf5oGhlOTYCgcZKh7aR5QUNg7GiN3ORtlgcstNbPsTMy7+T9aReqQxvmnwew=="},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"}],"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_1.0.1_1589633458467_0.0556272943704017"},"_hasShrinkwrap":false,"publish_time":1589633458568,"_cnpm_publish_time":1589633458568,"_cnpmcore_publish_time":"2021-12-18T20:40:18.957Z","contributors":[]},"2.0.1":{"name":"@devicefarmer/adbkit-logcat","version":"2.0.1","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/openstf/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"The OpenSTF Project","email":"contact@openstf.io","url":"https://openstf.io"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/openstf/adbkit-logcat.git"},"scripts":{"test":"mocha --recursive"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^3.0.2","sinon":"^1.17.5","sinon-chai":"^2.8.0"},"engines":{"node":">= 4"},"gitHead":"bda607190443954f195f95599335f463e51de45b","homepage":"https://github.com/openstf/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@2.0.1","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"shasum":"3bbcc3f7492f0a887feb833f5124a8dd6684f8d4","size":6255,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-2.0.1.tgz","integrity":"sha512-P0+YzTTSoPCBOOtRf6+vm9Ni4WMo4KpO9NOERYZMrstTVxPeLZyNrmE3etESyOWz24JVWGQJ69XUU5EUOjz9gQ=="},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"}],"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_2.0.1_1589630414849_0.32536495873053206"},"_hasShrinkwrap":false,"publish_time":1589630415044,"_cnpm_publish_time":1589630415044,"_cnpmcore_publish_time":"2021-12-18T20:40:19.283Z","contributors":[]},"2.1.2":{"name":"@devicefarmer/adbkit-logcat","version":"2.1.2","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/devicefarmer/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"The OpenSTF Project","email":"contact@devicefarmer.com","url":"https://devicefarmer,com"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/devicefarmer/adbkit-logcat.git"},"scripts":{"compile":"tsc -p .","format":"eslint ./lib --fix --ext .ts","lint":"eslint ./ --ext .ts","prepublish":"npm run compile && npm run test","test":"mocha --recursive"},"dependencies":{},"devDependencies":{"@types/node":"^15.14.0","@typescript-eslint/eslint-plugin":"^4.4.1","@typescript-eslint/parser":"^4.4.1","chai":"^4.3.3","eslint":"^7.11.0","eslint-config-prettier":"^8.0.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-progress":"0.0.1","mocha":"^8.3.1","prettier":"^2.1.2","sinon":"^1.17.5","sinon-chai":"^2.8.0","typescript":"^4.0.3"},"engines":{"node":">= 4"},"types":"./index.d.ts","gitHead":"83a5505faf90e11258ca51646fa13674e7e7b7ef","homepage":"https://github.com/devicefarmer/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@2.1.2","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-G4grpEa5s9s9wCRs8YB9LjFSnz0Os3g3RYIwZSxH3JFfV3aejL5xlu4hHMH4JY+d4oCCwImcEZJcFPY9BEP21w==","shasum":"4db1eee8046ad8b296ca8ab757862d6172411a05","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-2.1.2.tgz","fileCount":19,"unpackedSize":27528,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFLLTpk0ov0+uFdKT0hQQO3m9qxxIppKd5mjSj8brzcqAiA0LFN4FW9CyJQpjDNjwDBYw7CU93OflMEYuRL0CPAhKw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYD7LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqb4Q/9EM/itUC1JOQaHtpLgZFPSqtRvXj64hxFVRRiADsGEgdIrsOQ\r\naaUTS8IteZdyZlOLbqgaz17du5ykyjn21cM4o1mkbXMglcVs/+99oPntO8Vg\r\nhwry76u5UGhCByZcuLWjZeWUKlafGY/UWsMW+fFA4CVZiqfdhN9+382ftpPK\r\n9hChCn2i+quLboQbkfleevgaX8Qrk/UNGVvGhSnRJG1xNz/QnuvS45uzgm2g\r\nq4urEOq1gg2CwlATGbUP5zMNPkkHRGdeC6/J2lMwTBzmfSXuTxyUuV0fkmpf\r\nq/39dKDm6ibhoiTlXuN36TB2iri5qPAvLzKk4F1bfIQRq01rgD0aT9APLNGA\r\nWPV9lYCLngZMwYF6zZJxlCEthLBsn8n+M3MldIHDnHpqYb/4qr7ca5BpWIqg\r\nmk3uQNJLrjcKPY56vI7CoRDrSPp/HamU/6zCvQFtJpkmebKUal+b+d6+js2t\r\nhgxK+viZakZZi1qUu0L2/m6hpKhzbNnqAiumVjN/FoQrOhHTGrnH0LcZHbzP\r\n2Vapy5DSPHcp8tTFEFoZPzfmMOrCR+27myhDnezAR+TCKDCMc8z9gySVeKSM\r\njD6zn9waGnDOsAXxBZoP9fRnUbDwpE7A00OeUb00C+aXDrYxZN4xNeBseBRR\r\nJBsrT83DBSk8LQTl3KQJwhg6HpXmM5RAYoI=\r\n=z1TD\r\n-----END PGP SIGNATURE-----\r\n","size":8052},"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},{"name":"anonymous","email":"npm@codechild.com"},{"name":"anonymous","email":"denis.barbaron@orange.com"},{"name":"anonymous","email":"pierre.crepieux@orange.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_2.1.2_1650474699520_0.40632147162626153"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-20T17:11:44.469Z","contributors":[]},"2.1.3":{"name":"@devicefarmer/adbkit-logcat","version":"2.1.3","description":"A Node.js interface for working with Android's logcat output.","keywords":["adb","adbkit","logcat"],"bugs":{"url":"https://github.com/devicefarmer/adbkit-logcat/issues"},"license":"Apache-2.0","author":{"name":"The OpenSTF Project","email":"contact@devicefarmer.com","url":"https://devicefarmer,com"},"main":"./index","repository":{"type":"git","url":"git+https://github.com/devicefarmer/adbkit-logcat.git"},"scripts":{"compile":"tsc -p .","format":"eslint ./lib --fix --ext .ts","lint":"eslint ./ --ext .ts","prepublish":"npm run compile && npm run test","test":"mocha --recursive"},"dependencies":{},"devDependencies":{"@types/node":"^18.15.11","@typescript-eslint/eslint-plugin":"^5.54.0","@typescript-eslint/parser":"^5.57.0","chai":"^4.3.3","eslint":"^8.24.0","eslint-config-prettier":"^8.0.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-progress":"0.0.1","mocha":"^10.2.0","prettier":"^2.1.2","sinon":"^15.0.1","sinon-chai":"^3.7.0","typescript":"^5.0.2"},"engines":{"node":">= 4"},"types":"./index.d.ts","gitHead":"45f94bb3c69ea3b7fa83f5f28fe87f1caef43c34","homepage":"https://github.com/devicefarmer/adbkit-logcat#readme","_id":"@devicefarmer/adbkit-logcat@2.1.3","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-yeaGFjNBc/6+svbDeul1tNHtNChw6h8pSHAt5D+JsedUrMTN7tla7B15WLDyekxsuS2XlZHRxpuC6m92wiwCNw==","shasum":"c7a1fb58e500f5799711f32906a2210c0d1ac5ac","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@devicefarmer/adbkit-logcat/-/adbkit-logcat-2.1.3.tgz","fileCount":19,"unpackedSize":27625,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGkLmStgvM+RH/p3GSMyddHHTp2tcUfiBY4RnRTiZa3AiEA6IDgaNF5U4mx6D5s0ciGJ70jxzZtzjD6CvQrUHY07p4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJZqdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1ehAAncSGKQgDhhwkHq0mABv3Y1P18/mTbblWBqEwJ19yM3flVg+d\r\nxu+hHby14gw3ilDMUYPuq0PmblZ0IKqeHhoGbSCBCr8DV/9MlKvmCCqov540\r\neSEeUoNhI0AU5RAOpN39tCXysmj4g5pi4ObzAbI8jE5CjdYWhyXyENA1XWRC\r\nmy0idOcrhrG9VJczvijPVaDSqmhlIYJNJXN2wiYLMvjbjtu7Z4+xdjAU4dd/\r\nCfKMMEIiXuta2JDIkCsA+Ed/0vyrBPFdi1Q0yZFo84XA1DepGZgmYhsu2FgO\r\nnOaXnJVpqY4F1/LLfOOojBcDcZxfT0kRjc5Igzfrf7K+XIOwoDN9f4Mdsg14\r\njbu7HqpVyq4BblMqrNPwDPnKzwMzxLFu146tf95Y8aJ25XCtzdjTwGJR0XY/\r\nk/eKF/HMPQbbLfqNA/uCJFwP7WmE4f/4MCyc91sfcBenUICl9qiI8wPxuvpa\r\nMdusbxKvEESgODBHDC5wtzJuw6dnL9nDI/zvI9JQiBpFSas/zVUFALjEO+rd\r\nOzg20yaSInJHWY1Fx9ld3GNEYTZQxgO5PqDJYVHa6P4LbRPI3K4QzIzRl+4V\r\nYpHgAXSOJOodkQVfdBCFpB0Lt+Hm7Mps17+wzagvqfQKp29meClw0G179meH\r\ny9o4YGdzWRbHWY80ttEj4hLpanTmmGjkDwc=\r\n=8Aar\r\n-----END PGP SIGNATURE-----\r\n","size":8059},"_npmUser":{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},"directories":{},"maintainers":[{"name":"anonymous","email":"karol.wrotniak@droidsonroids.pl"},{"name":"anonymous","email":"npm@codechild.com"},{"name":"anonymous","email":"denis.barbaron@orange.com"},{"name":"anonymous","email":"pierre.crepieux@orange.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adbkit-logcat_2.1.3_1680186012871_0.04234879271733516"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-03-30T14:20:13.056Z","publish_time":1680186013056,"contributors":[]}},"dist-tags":{"latest":"2.1.3"},"name":"@devicefarmer/adbkit-logcat","time":{"created":"2022-01-26T23:25:01.103Z","modified":"2023-03-30T21:29:55.514Z","2.1.1":"2021-03-08T15:02:54.362Z","2.1.0":"2021-03-08T10:02:35.668Z","1.1.0":"2020-05-16T12:58:09.763Z","1.0.1":"2020-05-16T12:50:58.568Z","2.0.1":"2020-05-16T12:00:15.044Z","2.1.2":"2022-04-20T17:11:39.681Z","2.1.3":"2023-03-30T14:20:13.056Z"},"readme":"# adbkit-logcat\n\n**adbkit-logcat** provides a [Node.js][nodejs] interface for working with output produced by the Android [`logcat` tool][logcat-site]. It takes a log stream (that you must create separately), parses it, and emits log entries in real-time as they occur. Possible use cases include storing logs in a database, forwarding logs via [MessagePack][msgpack], or just advanced filtering.\n\n## Requirements\n\n* [Node.js](http://nodejs.org/) 4.x or newer. Older versions are not supported.\n\n## Getting started\n\nInstall via NPM:\n\n```bash\nnpm install --save adbkit-logcat\n```\n\n### Examples\n\n#### Output all log messages\n\n##### JavaScript\n\n```javascript\nconst logcat = require('adbkit-logcat')\nconst {spawn} = require('child_process')\n\n// Retrieve a binary log stream\nconst proc = spawn('adb', ['logcat', '-B'])\n\n// Connect logcat to the stream\nreader = logcat.readStream(proc.stdout)\nreader.on('entry', entry => {\n  console.log(entry.message)\n})\n\n// Make sure we don't leave anything hanging\nprocess.on('exit', () => {\n  proc.kill()\n})\n```\n\n## API\n\n### Logcat\n\n#### logcat.Priority\n\nExposes `Priority`. See below for details.\n\n#### logcat.Reader\n\nExposes `Reader`. See below for details.\n\n#### logcat.readStream(stream[, options])\n\nCreates a logcat reader instance from the provided logcat event [`Stream`][node-stream]. Note that you must create the stream separately.\n\n**IMPORTANT: The default line break behavior has changed on newer Android versions. Since adbkit-logcat merely parses output and is not able to communicate with ADB, you must _externally_ detect whether you need the `fixLineFeeds` option enabled or not. For newer versions it should be off.**\n\n* **stream** The event stream to read.\n* **options** Optional. The following options are supported:\n    - **format** The format of the stream. Currently, the only supported value is `'binary'`, which (for example) `adb logcat -B` produces. Defaults to `'binary'`.\n    - **fixLineFeeds** On older Android versions, ADB shell automatically transformed any `'\\n'` into `'\\r\\n'`, which broke binary content. If set, this option reverses the transformation before parsing the stream. Defaults to `true` for backwards compatibility. You **MUST** set this option to `false` on newer versions.\n* Returns: The `Reader` instance.\n\n### Priority\n\n#### Constants\n\nThe following static properties are available:\n\n* **Priority.UNKNOWN** i.e. `0`.\n* **Priority.DEFAULT** i.e. `1`. Not available when reading a stream.\n* **Priority.VERBOSE** i.e. `2`.\n* **Priority.DEBUG** i.e. `3`.\n* **Priority.INFO** i.e. `4`.\n* **Priority.WARN** i.e. `5`.\n* **Priority.ERROR** i.e. `6`.\n* **Priority.FATAL** i.e. `7`.\n* **Priority.SILENT** i.e. `8`. Not available when reading a stream.\n\n#### Priority.fromLetter(letter)\n\nStatic method to convert the given `letter` into a numeric priority. For example, `Priority.fromName('d')` would return `Priority.DEBUG`.\n\n* **letter** The priority as a `String`. Any single, case-insensitive character matching the first character of any `Priority` constant is accepted.\n* Returns: The priority as a `Number`, or `undefined`.\n\n#### Priority.fromName(name)\n\nStatic method to convert the given `name` into a numeric priority. For example, `Priority.fromName('debug')` (or `Priority.fromName('d')`) would return `Priority.DEBUG`.\n\n* **name** The priority as a `String`. Any full, case-insensitive match of the `Priority` constants is accepted. If no match is found, falls back to `Priority.fromLetter()`.\n* Returns: The priority as a `Number`, or `undefined`.\n\n#### Priority.toLetter(priority)\n\nStatic method to convert the numeric priority into its letter representation. For example, `Priority.toLetter(Priority.DEBUG)` would return `'D'`.\n\n* **priority** The priority as a `Number`. Any `Priority` constant value is accepted.\n* Returns: The priority as a `String` letter, or `undefined`.\n\n#### Priority.toName(priority)\n\nStatic method to convert the numeric priority into its full string representation. For example, `Priority.toLetter(Priority.DEBUG)` would return `'DEBUG'`.\n\n* **priority** The priority as a `Number`. Any `Priority` constant value is accepted.\n* Returns: The priority as a `String`, or `undefined`.\n\n### Reader\n\nA reader instance, which is an [`EventEmitter`][node-events].\n\n#### Events\n\nThe following events are available:\n\n* **error** **(err)** Emitted when an error occurs.\n    * **err** An `Error`.\n* **end** Emitted when the stream ends.\n* **finish** Emitted when the stream finishes.\n* **entry** **(entry)** Emitted when the stream finishes.\n    * **entry** A log `Entry`. See below for details.\n\n#### constructor([options])\n\nFor advanced users. Manually constructs a `Reader` instance. Useful for testing and/or playing around. Normally you would use `logcat.readStream()` to create the instance.\n\n* **options** See `logcat.readStream()` for details.\n* Returns: N/A\n\n#### reader.connect(stream)\n\nFor advanced users. When instantiated manually (not via `logcat.readStream()`), connects the `Reader` instance to the given stream.\n\n* **stream** See `logcat.readStream()` for details.\n* Returns: The `Reader` instance.\n\n#### reader.end()\n\nConvenience method for ending the stream.\n\n* Returns: The `Reader` instance.\n\n#### reader.exclude(tag)\n\nSkip entries with the provided tag. Alias for `reader.include(tag, Priority.SILENT)`. Note that even skipped events have to be parsed so that they can be ignored.\n\n* **tag** The tag string to exclude. If `'*'`, works the same as `reader.excludeAll()`.\n* Returns: The `Reader` instance.\n\n#### reader.excludeAll()\n\nSkip **ALL** entries. Alias for `reader.includeAll(Priority.SILENT)`. Any entries you wish to see must be included via `include()`/`includeAll()`.\n\n* Returns: The `Reader` instance.\n\n#### reader.include(tag[, priority])\n\nInclude all entries with the given tag and a priority higher or equal to the given `priority`.\n\n* **tag** The tag string to include. If `'*'`, works the same as `reader.includeAll(priority)`.\n* **priority** Optional. A lower bound for the priority. Any numeric `Priority` constant or any `String` value accepted by `Priority.fromName()` is accepted. Defaults to `Priority.DEBUG`.\n* Returns: The `Reader` instance.\n\n#### reader.includeAll([priority])\n\nInclude all entries with a priority higher or equal to the given `priority`.\n\n* **tag** The tag string to exclude.\n* **priority** Optional. See `reader.include()` for details.\n* Returns: The `Reader` instance.\n\n#### reader.resetFilters()\n\nResets all inclusions/exclusions.\n\n* Returns: The `Reader` instance.\n\n### Entry\n\nA log entry.\n\n#### Properties\n\nThe following properties are available:\n\n* **date** Event time as a `Date`.\n* **pid** Process ID as a `Number`.\n* **tid** Thread ID as a `Number`.\n* **priority** Event priority as a `Number`. You can use `logcat.Priority` to convert the value into a `String`.\n* **tag** Event tag as a `String`.\n* **message** Message as a `String`.\n\n#### entry.toBinary()\n\nConverts the entry back to the binary log format.\n\n* Returns: The binary event as a [`Buffer`][node-buffer].\n\n## More information\n\n* [logprint.c](https://github.com/android/platform_system_core/blob/master/liblog/logprint.c)\n* [logcat.cpp](https://github.com/android/platform_system_core/blob/master/logcat/logcat.cpp)\n* [logger.h](https://github.com/android/platform_system_core/blob/master/include/log/logger.h)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nSee [LICENSE](LICENSE).\n\nCopyright © The OpenSTF Project. All Rights Reserved.\n\n[nodejs]: <http://nodejs.org/>\n[msgpack]: <http://msgpack.org/>\n[logcat-site]: <http://developer.android.com/tools/help/logcat.html>\n[node-stream]: <http://nodejs.org/api/stream.html>\n[node-events]: <http://nodejs.org/api/events.html>\n[node-buffer]: <http://nodejs.org/api/buffer.html>","users":{}}