Giter VIP home page Giter VIP logo

logcat-filter's Introduction

Logcat-filter and analysis tool

The checkLoggingCoverage.js tool probably belongs more in log-searcher

Requirements

  • ADB (>=1.0.39)
  • NodeJS (>=8.0.0)
  • NPM dependencies:
    npm install

Logcat-filter => JSON file

To start listening for logs for a specific package(s):

  • Ensure Device is plugged in
  • Run Logcat-Filter
    node ./index.js --package org.kiwix.kiwixmobile --package org.kiwix.kiwixcustomexample

Each time the Android package(s) is started, a new file will be opened and appended to.

Logging Coverage Checker

To check log coverage, ensure you have successfully run log-searcher.

node ./checkLoggingCoverage.js --logsJSON ./<YOUR_OUTPUT_FILE>log.json --logAnalysis ../log-searcher/data.json
  • --logsJSON is a completed output file from logcat-filter (./index.js)
  • --logAnalysis is the output of log-searcher

This will generate reportData.json.

To view a report, run

npm run serve

Confirmed Working Devices

Nexus 7 SM-G361F KFOT (Kindle Fire) Lenovo B6000 UBISLATE 7C+ (Android 4.0.4)

Startup Log Formats

1: Start proc {packageName} for added application {packageName}: pid={PID} uid=XXXX gids={XXXX, XXXX} 2: Start proc {PID}:{packageName}/XXXX for added application {packageName}

Lenovo V6000: 1 KFOT: 1 UBISlate 7C+: 1 Nexus 7 13: 2 SM-G361F: 2

logcat-filter's People

Contributors

isnit0 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

logcat-filter's Issues

Cope with different formats of logcat Start proc messages

There are at least 2 formats of the Start proc message.
Perhaps they vary by Android version?

  1. HTC 510 4.4.3 v2ActivityManagerStart proc org.kiwix.kiwixmobile for activity org.kiwix.kiwixmobile/.utils.SplashActivity: pid=9137 uid=10344 ...
  2. Nexus 7 6.0.1 ActivityManagerStart proc 19482:org.kiwix.kiwixmobile/u0a183 for activity org.kiwix.kiwixmobile/.utils.SplashActivity

I've saved a copy of what seems to be a valid regex: Start proc \d*:*org.kiwix.kiwixmobile which is also available with the examples above at https://regex101.com/r/HWBLxZ/1

What I'm trying to discover is how to use a/the regex in watchForPID in index.js

Provide a way to cope with multiple connected devices

As the README states, the script expects the device to be connected. Currently the script fails when multiple android devices are available (as confirmed by adb devices). It'd be great to have a way to either run this in parallel for several devices, or select the device to monitor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.