Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7526869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:57:14+00:00 2026-05-30T03:57:14+00:00

I need to dump logcat with filter programmatically. I applied adb logcat -s TAGNAME

  • 0

I need to dump logcat with filter programmatically. I applied adb logcat -s “TAGNAME” but the app just “hung”. there is a similar thread but there is no solution: Read filtered log cat(Programmatically)?

        try {
            Process process = Runtime.getRuntime().exec("logcat -s XXX");
            BufferedReader bufferedReader = new BufferedReader(
                    new InputStreamReader(process.getInputStream()));

            StringBuilder log = new StringBuilder();
            String line;
            while ((line = bufferedReader.readLine()) != null) {
                log.append(line);
                log.append(FragmentLog.LINE_SEPARATOR);
            }

            ((TextView) tv).setText(log.toString());

        } catch (IOException e) {
            ((TextView) tv).setText(R.string.default_blank);
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:57:15+00:00Added an answer on May 30, 2026 at 3:57 am

    I am using another way to get my app work. Here is the code, in case anyone wants to know,.

        try {               
            Process process = Runtime.getRuntime().exec("logcat -d");
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
    
            String line;
    
            Pattern pattern = Pattern.compile("XXX", 0);
    
            while ((line = bufferedReader.readLine()) != null) {
                if (patternu != null
                        && !pattern.matcher(line).find()) {
                    continue;
                }
                log.append(line);
                log.append('\n');
            }
    
        } catch (IOException e) {
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to do a dump of a table on a remote server, but
I need UI thread dump for Eclipse RCP application. Could you please help on
Hi need to dump my mysql database with views and sp's. But I don't
I need this for debugging purposes and need to dump all variables. Is there
I am developing a tool to dump data from variables. I need to dump
From time to time, I need to dump USB traffic under Windows, mostly to
How can I make a mysql dump for table from a query? I need
need ask you about some help. I have web app running in Net 2.0.
I am writing some tests for Javascript code and I need to dump some
I have a DataTable in memory that I need to dump straight into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.