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

  • Home
  • SEARCH
  • 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 612107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:51:26+00:00 2026-05-13T17:51:26+00:00

How to redirect logging on device to file? My application is hang on device

  • 0

How to redirect logging on device to file?

My application is hang on device but works great on emulator – I want to see logging on my device without sdk and its tools.

  • 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-13T17:51:27+00:00Added an answer on May 13, 2026 at 5:51 pm

    I found excellent feature of Logcat. It can redirect output to file himself by using simple command parameter “-f “.
    To use it you can write Logcat wrapper in your application aLogcat like. Obviously I made this 🙂

    For using logcat at android I wrote this code:

    Process proc = null;
    try {
      proc = Runtime.getRuntime().exec(new String[] { "logcat", <!parametes_here!> });
      mReader = new BufferedReader(new InputStreamReader(proc.getInputStream()), 1024);
      String line;
      while ((line = mReader.readLine()) != null) {
       if (line.length() == 0) {
        continue;
       }
      mHandler.sendMessage(mHandler.obtainMessage(Logcat.MSG_READ_LINE, line));
     }
    } catch (IOException e) {
     Log.e(TAG, "Cannot start process", e);
    } finally {
      if (mReader != null)
      try {
        mReader.close();
      } catch (IOException e) {
        Log.e(TAG, "Cannot close stream", e);
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a legacy PSVM application which I'd like to redirect its logging output
For logging purposes i want to log the redirect target of the current request
I want to redirect from an action in one controller to an action in
I'm trying to redirect users to custom url /gallery/(username)/ after successfully logging in. It
I redirect the user to the login page when user click log out however
I'm trying to redirect all requests to my domain to another domain using mod_rewrite
How do you redirect HTTPS to HTTP?. That is, the opposite of what (seemingly)
I'd like to redirect the stdout of process proc1 to two processes proc2 and
How can I redirect the response to an IFrame?
I'm trying to redirect requests for a wildcard domain to a sub-directory. ie. something.blah.example.com

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.