logcat

How to filter out a tagname in Eclipse LogCat viewer

前提是你 提交于 2019-11-27 10:16:08
I have an Android application that "spams" the LogCat and I would like to remove its logcat entries in order to have an output more readable. Is it possible to have a filter that remove the LogCat entries for a specific tag name? Or a search pattern that does the trick? Yes. Create a filter where the "By log tag" field is ^(?!.*(MYTAG)).*$ where MYTAG is the tag you don't want to see. I am not a regexp expert (a "regexpert"? ;-) ) so there may be a simpler way to do that negation, but I just tried that and it works. You can play around with the filter in the field just above the Log Cat

How to empty (clear) the logcat buffer in Android [duplicate]

我只是一个虾纸丫 提交于 2019-11-27 10:03:17
问题 This question already has an answer here: How can I erase the old data from logcat? 3 answers How can I empty (clear) the logcat buffer in Android? I use adb logcat from command line and pipe the output to a file, since the DDMS has a very limited buffer. At the moment, when I restart my app (after fixing bugs etc) the logcat buffer has data from the previous launch as well. Even uninstalling the app does not clear the buffer. The only way I've found so far to clear the buffer, is reboot.

Send Logcat output of an App to an EmailAdress

梦想的初衷 提交于 2019-11-27 08:52:42
We are now testing our application with a few friends. Sometimes there are some errors which don't throw an exception. So I don't really know whats the problem was. So I thought it would be a good idea to implement a menu item which allows to send the logcat output to a e-mail address, so that we can examine the log. Unfortunately I didn't find a hint in the Internet how to extract the logcat from a phone. How to send an email shouldn't be the problem. Look at android-log-collector , as it does what you are trying to do. It is not possible to collect arbitrary LogCat data as of Android 4.1.

How to copy logcat output to clipboard?

試著忘記壹切 提交于 2019-11-27 08:33:14
I'm developing android apps in eclipse and how can I get logcat messages to my clipboard? Select the message and press ctrl+c. You can save it in a text file using this button: If you are using mac a workaround is to right click, find similar messages, then copy from dialog. – Thank you Snicolas You can click on the output line in LogCat and click [ctrl]+[c] like normal then a normal paste into whatever you want. You can use shift and click to select multiple lines. Ctrl + C works but you need to make sure to make sure you click on the first line of any output that is split into multiple lines

android.os.NetworkOnMainThreadException on service start on android

浪尽此生 提交于 2019-11-27 07:44:34
问题 after trying my brand new service on android i get this: i guess is something related to the manifest file and permissions, the service is started after the last activity, to update data on server and retrieve new data and save id on sqlite on android: here also the manifest file: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ggservice.democracy" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion

Using adb logcat with a real phone (and not the emulator)

南楼画角 提交于 2019-11-27 07:37:47
when I'm using the Android emulator I can do "adb logcat" to see output messages (log / system.out.println) originated from my code. It also shows the stack trace of exceptions which happen during execution. But, when I'm using a real phone, "adb logcat" does not do / show anything. I also tried "adb -d logcat" which also does not display anything. Is there any way to get it working with the real phone? Thanks. UPDATE: I just tried "adb -s ? logcat" ('?' is the serial number of the device) and also got no results. I tried another "adb" command to see if anything was working: "adb -s ?

adb命令使用

半世苍凉 提交于 2019-11-27 06:55:22
摘取简书中作者: anly_jun 中的内容 1, adb简介 adb全名Andorid Debug Bridge. 顾名思义, 这是一个Debug工具. 然而, 为何称之为Bridge呢? 因为adb是一个标准的CS结构的工具, 是要连接开发电脑和你的调试手机的.包含如下几个部分: Client端, 运行在开发机器中, 即你的开发PC机. 用来发送adb命令. Deamon守护进程, 运行在调试设备中, 即的调试手机或模拟器. Server端, 作为一个后台进程运行在开发机器中, 即你的开发PC机. 用来管理PC中的Client端和手机的Deamon之间的通信. 2, 常用用法 2.1 adb devices 列举当前连接的调试设备 $ adb devices List of devices attached DU2SSE1467010378 device 2.2 adb logcat 打印log信息 指令 说明 备注 adb logcat 打印log / adb logcat -c 清除手机的log buffer 有些手机权限控制, 不支持. adb logcat -b <buffer> 打印指定buffer的log信息 buffer有: main(主log区,默认), events(事件相关的log), radio(射频, telephony相关的log) adb

Android saving logs on every run for crash report

情到浓时终转凉″ 提交于 2019-11-27 06:09:35
问题 I'm currently developing an android app. I noticed a very rare error which leeds to a crash of my app. Unfortunately, I had my smartphone never connected to my pc when it occured. So, is there a way to automatically save all logs (and especially the thrown runtimeexceptions) to a file when my app starts, so that I can copy this file to my pc and analyse the error? The file should be overwritten on every start of my app, so that it contains only the logs of the last run... How can I achieve

Read logs from all apps on android from within an app for android 4.2+

自作多情 提交于 2019-11-27 05:32:01
I believe there have been changes to the ways apps can read logs in android post 4.2. But I wanted to know if I can read all the logs including system logs from logcat from within an app for current versions of android? If yes does it need some permission or not? Unless you rooted you cannot do this since Jelly Bean. See this Android bug report and this related discussion . Quote: The change is that third party applications can no longer get the read logs permission, however every app can read the logs containing only the lines they have written, without needing any permission. Keep in mind

Saving Logcat to a text file in Android Device

梦想与她 提交于 2019-11-27 05:07:36
问题 I had found some crashes while running the application in android device, which is not showing in emulator. So i need to save the Logcat in a text file in my device's memory or SD card. Could you please suggest me good method to do this? 回答1: use a Application class at the beginning of your app. That allows a proper file and log handling. Here is an example. That piece of code adds a new folder named “MyPersonalAppFolder” with another folder called “log” in it to the public external storage.