UNPKG

@u4/adbkit

Version:

A Typescript client for the Android Debug Bridge.

25 lines 1.04 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const linetransform_1 = __importDefault(require("../../linetransform")); const command_1 = __importDefault(require("../../command")); class LogcatCommand extends command_1.default { async execute(options = {}) { // For some reason, LG G Flex requires a filter spec with the -B option. // It doesn't actually use it, though. Regardless of the spec we always get // all events on all devices. let cmd = 'logcat -B *:I 2>/dev/null'; if (options.clear) { cmd = `logcat -c 2>/dev/null && ${cmd}`; } this.sendCommand(`shell:echo && ${cmd}`); await this.readOKAY(); return this.parser.raw().pipe(new linetransform_1.default({ autoDetect: true, })); } } exports.default = LogcatCommand; //# sourceMappingURL=logcat.js.map