Skip to content

mii860417/logcat-error-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

🧰 Logcat Error Filter

A lightweight tool to filter important error lines from Android logcat output.

This tool helps developers quickly extract useful log lines such as:

  • FATAL EXCEPTION
  • Exception
  • Error
  • E level logs
  • AndroidRuntime
  • ANR
  • Caused by

Built with Python + Streamlit.


🚀 Demo

Try the tool online:

https://logcat-error-filter.streamlit.app


❓ Why This Tool Exists

Android logcat is often noisy and difficult to read.

A typical logcat output may contain:

  • info logs
  • debug logs
  • network logs
  • framework logs
  • only a few lines that are actually useful for debugging

Example raw logcat:

03-11 10:01:21.123  1234  1234 I ActivityManager: Start proc 4321:com.example.app/u0a123 for activity
03-11 10:01:22.456  1234  5678 D NetworkClient: request start
03-11 10:01:23.789  1234  1234 E AndroidRuntime: FATAL EXCEPTION: main
03-11 10:01:23.790  1234  1234 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method on a null object reference
03-11 10:01:23.791  1234  1234 E AndroidRuntime:     at com.example.app.MainActivity.onCreate(MainActivity.kt:42)
03-11 10:01:24.100  1234  5678 D OkHttp: request finished

Only a few lines are truly important.

This tool extracts those lines automatically.

🧠 Example Output

03-11 10:01:23.789  1234  1234 E AndroidRuntime: FATAL EXCEPTION: main
03-11 10:01:23.790  1234  1234 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method on a null object reference
03-11 10:01:23.791  1234  1234 E AndroidRuntime:     at com.example.app.MainActivity.onCreate(MainActivity.kt:42)

This makes log inspection much faster.

✨ Features

  • Filter Android logcat output

  • Extract important error-related lines

  • Detect FATAL EXCEPTION

  • Detect Exception and Error

  • Highlight E level logs

  • Show a simplified debugging view

🔧 Supported Stack Trace Types

Currently optimized for:

  • Android logcat

  • Android crash logs

  • AndroidRuntime output

  • Java / Kotlin exception lines

  • ANR-related lines

Supported keywords include:

  • FATAL

  • Exception

  • E

  • AndroidRuntime

  • ANR

  • Caused by

⚙️ How It Works

The filter uses simple keyword-based matching.

Steps:

  1. Split logcat into lines

  2. Check each line for important error keywords

  3. Keep only matching lines

  4. Return a simplified error-focused output

This approach keeps the tool lightweight and fast.

🖥 Run Locally

Install dependencies

pip install -r requirements.txt

Run the Streamlit app

streamlit run app.py

Then open your browser:

http://localhost:8501

📁 Project Structure

logcat-error-filter
│
├── app.py
├── requirements.txt
└── README.md

🧪 Example Stack Trace

03-11 10:01:21.123  1234  1234 I ActivityManager: Start proc 4321:com.example.app/u0a123 for activity
03-11 10:01:22.456  1234  5678 D NetworkClient: request start
03-11 10:01:23.789  1234  1234 E AndroidRuntime: FATAL EXCEPTION: main
03-11 10:01:23.790  1234  1234 E AndroidRuntime: java.lang.NullPointerException
03-11 10:01:23.791  1234  1234 E AndroidRuntime:     at com.example.app.MainActivity.onCreate(MainActivity.kt:42)
03-11 10:01:24.100  1234  5678 D OkHttp: request finished

🔍 Audience

This project targets common developer searches such as:

  • logcat error filter

  • android logcat filter

  • filter logcat errors

  • android logcat exception filter

  • androidruntime log parser

  • logcat debugging tool

🔗 Related Tools

You may also be interested in:

These tools help developers debug logs more efficiently.

About

Logcat Error Filter – Extract important error, exception, and FATAL lines from Android logcat output.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages