Android Desktop Log Viewer

Android desktop log viewer

Desktop tool for reading android logcat log file, the same as DDMS.
Sample Image
The purpose of this tool is to allow developers to quickly locate, analyze, problem-solving, rather
than struggling in the log file.

Feature:
http://code.google.com/p/androidlogcatviewer/wiki/KeyFeature

Download:
http://code.google.com/p/androidlogcatviewer/downloads/list

Discuss-group:
http://groups.google.com/group/androidlogcatviewer

How to easily view and filter Android's logcat in Windows?

If you need a GUI, the Android SDK delivers a filterable logcat display tool in the Device Monitor.

Execute monitor.bat in the android-sdk\tools folder to bring it up. You can en- or disable scrolling with the Arrow-Down symbol on the right of the filter bar.

How to create and read Log on Android devices?

View Logs on Android:

To see Debug.Log messages, download Android Studio.
Go to the Android Monitor Tab in the Android Studio then select your device from there.

See the image below:

Sample Image


If you have problems of the logs from the device not showing, restart adb.exe. from the command-line.

Stop it:

adb kill-server

Then start it again:

adb start-server

All I want to see is a clean log that shows errors and my Debug.Log
messages which I usually can see easy and clear on the Unity Console
on Unity on Windows.

1.First filter it with the Unity tag.

Sample Image

2.Disable Development mode from Unity Build Settings. With that on, you will receive extra logs you don't even need.

View Logs on Android without Android Studio:

You can view log from without Android Studio by using the Log Viewer plugin which is free. It will let you see the log on the device itself.

Sample Image


Print Logs from Android Java Plugin:

If you are trying to create log from Java plugin, instead of using the Debug.Log function, use one of the Log functions from Java side.

For example, Log.v, Log.i, and Log.e.

Print Logs from Android C++ Plugin:

If using a C++ plugin, see this plugin from my other question which let's you print log from a C++ plugin with Debug::Log.

How do I get the logfile from an Android device?

Logcollector is a good option but you need to install it first.

When I want to get the logfile to send by mail, I usually do the following:

  • connect the device to the pc.
  • Check that I already setup my os for that particular device.
  • Open a terminal
  • Run adb shell logcat > log.txt

Read logcat externally

To get logs from the TV you need to use ADB over TCP/IP.

  1. Enable Developer options: Press Home and select Settings. In the TV row, select About. Scroll down to and click on Build several times until a dialog appears with the message "You are now a developer" appears.
  2. Enable Debugging: Press Home and go back into the Settings menu. In the System Preferences row, select Developer options, select Debugging, select ADB Debugging, select On.
  3. Find the TV IP address: Press Home and select Network Settings.
  4. Make sure your TV and your computer are connected to the same local network.
  5. On your computer, open a terminal and type: adb connect <IP address of your TV>
  6. In the Allow debugging? dialog, select Always allow from this computer and select OK.
  7. You can verify the connection is established by typing: adb devices
  8. To get a log, type: adb logcat

Android logcat: Send log entries from device using email

Call this method in onDestroy of your main activity.

 public void SendLogcatMail(){

// save logcat in file
File outputFile = new File(Environment.getExternalStorageDirectory(),
"logcat.txt");
try {
Runtime.getRuntime().exec(
"logcat -f " + outputFile.getAbsolutePath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

//send file using email
Intent emailIntent = new Intent(Intent.ACTION_SEND);
// Set type to "email"
emailIntent.setType("vnd.android.cursor.dir/email");
String to[] = {"yourmail@gmail.com"};
emailIntent .putExtra(Intent.EXTRA_EMAIL, to);
// the attachment
emailIntent .putExtra(Intent.EXTRA_STREAM, outputFile.getAbsolutePath());
// the mail subject
emailIntent .putExtra(Intent.EXTRA_SUBJECT, "Subject");
startActivity(Intent.createChooser(emailIntent , "Send email..."));
}

Logcat standalone client

adb logcat standalone app is the answer.

It can be downloaded from this site.



Related Topics



Leave a reply



Submit