How to get complete logcat from remote users phone?
I came across BUGFENDER and www.REMOTELOGCAT.com ... (didnt use yet.)
I need advice what professionals use for remote logging?
What is the industry standard?
How can I get complete logcat from my client's phone living in another country?
In iOS it gets saved in the phone itself so client can email that log file but whats the solution in android ?
P.S by 'complete logcat' i mean COMPLETE logcat rather than specified logs in code like log.e("some exception occured") as in crashlytics...
I'm not sure how to get the full logcat in Android.
What I can answer is that I'm professional and I use Bugfender for remote logging in iOS and React Native and I know many colleagues using Bufender for Android as well.
Related
I have a user who I've diagnosed to have object-box-related issues. I can send him debug builds with the ObjectBox debug flags (debugFlags(), debugRelations(), etc...) turned on. However, I would like to redirect the object box logs to a callback where I can collect the data and save to a file. Is this possible in ObjectBox?
Logs are currently created from native (C++) code, so there is no way to redirect them. But I agree a custom logger is a good idea (e.g. to log to an error report file on production builds).
If you have time, please create a feature issue for it at https://github.com/objectbox/objectbox-java/issues.
I am currently working on an embedded Android application. At present, we have released our device at a small scale and are trying to diagnose some of the problems that users are reporting. Currently, we are writing our logs locally to files on the SD card, but that is obviously a very limited solution.
We have a solution in mind which would involve creating a service to upload our logs automatically, but first I was wondering if there is any standard way to gather logs?
You can use a logging service like Loggly. Install an Android library to log to Loggly, such as Timber-Loggly. You can then start logging.
To make it easier to log to all of your loggers, create a logging function such as:
public static function dLog(String message) {
Log.d(TAG, message);
Timber.d(message);
}
I just setup app insights on my android app but I am not seeing any telemetry make it to the azure dashboard. Does anybody know if you have to do anything special in the setup to make it work when debugging? The documentation doesn't specify anything that would make me think it won't send when in debug mode but I put in the right instrumentation key and I am getting nothing.
As one of the answers mentioned, I checked the logcat after enabling developer mode. and here is what I found:
W/com.microsoft.applicationinsights.logging Sender: Couldn't send data
with IOException: java.net.UnknownHostException: Unable to resolve
host "dc.services.visualstudio.com": No address associated with
hostname
and this...
I/com.microsoft.applicationinsights.logging Sender: Persisting because
of IOException: :We're probably offline =)
and this...
I/com.microsoft.applicationinsights.logging Channel: enqueued
telemetry:Microsoft.ApplicationInsights.PageView
There is nothing more needed to enable events while debugging. Can you please enable developer mode using
ApplicationInsights.setDeveloperMode(true);
and look for log statements in logcat that say you are successfully sending data?
If your problem persists, please shoot me an email via AppInsights-Android#microsoft.com.
By the way, there was a 1.0-beta.9 release the other day, are you already using it?
I am new to Android. Please help me to know about the best practice of using Android Logger. Do I need to keep a file somewhere in android and keep on writing logs into it, or writing of logs into file is not necessary. What could be the best practice.
My real intention is this.
Once we go live, if our customers come back and tell us that something crashed or does not work in their android , then how do we debug ?
In the web application, I would ask my server administrator to provide the log files. What do we do with the android application when there is no server error, but something failed in the phone. Is there a way to get logs from the phone.
Thanks
Ravi
Depends on what you need, you need logging for semi debugging your application than you can easily use the buildin Log functionality. Via Logcat you can easiliy see the logs.
http://www.vogella.com/tutorials/AndroidLogging/article.html
//Declare a tag
String TAG= "SomeActivity";
//Log
Log.d(TAG, "Hello World"); //debug
Log.e(TAG, "Hello World"); //error
If you want to have logging of multiple devices when you have released your app. Use a dedicated Log Framework (e.g. Log4J) and upload it to a server.
One tip (if you are using Eclipse, and not directly related to question) - Eclipse is very unreliable for viewing logs. For apparently no reason it completely stops displaying logs every now and then. A simple solution is to use command line tools for viewing logs. On Linux you can do :
$adb logcat MyTag:D *:S
If you want to capture logs to a file you can do:
$adb logcat -d > logcat.txt.
Hope this helps!
If you are planning to publish/distribute your application then storing logs in a file is possible but as per my opinion better not a better solution. You can configure online tools from your app.
Catch all sever exceptions and sending all the details regarding that exception. And configure any one logging tool into you application.
You can see log4j http://logging.apache.org/log4j/2.x/ or ACRA http://acra.ch/ or http://www.crittercism.com/
The Android logger's (android.util.Log) output goes to a console that you don't have to maintain. You don't actually have to manage files, just outputs.
You have 5 categories of log:
verbose: use Log.v(tag, message)
debug: use Log.d(tag, message)
info: use Log.i(tag, message)
warning: use Log.w(tag, message)
error: use Log.e(tag, message)
For example:
Log.e("MyActivity", "Oops... caught this exception: " + exception.getMessage());
The LogCat console (this is its name) allows you filtering by log level. This is a ceil filtering. For example, if you filter by 'warnings', you will see all warnings and errors, but not verbose, debug and info messages.
You'll find more details here in the official documentation.
My real intention is this.
Once we go live, if our customers come back and tell us that something crashed or does not work in their android , then how do we debug ?
In the web application, I would ask my server administrator to provide the log files. What do we do with the android application when there is no server error, but something failed in the phone. Is there a way to get logs from the phone.
If you use file for storage logs - it possible problem with performance if the file become big. So you need clean file in time.
As for me best solution use firebase or https://fabric.io/.
We use fabric.io.
Also you can use some wrapper for default Log class. This one https://github.com/JakeWharton/hugo for example
Please bear with me as I am a complete noob and trying to create a database for my app using App Inventor.
According to Google App Launcher, I have successfully created my app. However, when I load mcdougaltextspeak.appspot.com into my browser, I get the following message:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
I am following the directions provided on http://appinventorapi.com/program-an-api-python/ and I'm sure my issue is because I am not correctly modifying the default app.ymal file
Here's what I have according to the directions:
application: textspeakedtech597
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /images
static_dir: images
- url: .*
script: main.py
I initially just changed myapp to mcdougaltextspeak, however I got a message that I needed to modify the code for python 2.7 according to this site:
https://developers.google.com/appengine/docs/python/python25/migrate27
This site also included modifications for other things, so I am wondering if my error stems from this. The directions do not make note of modifying any other code. Do I need to modify/add the code that appears on the migrate to python 2.7 page (see above link) and if so where does it go.
My app is stuck without a location to hold data.
Any advice on how to proceed is greatly appreciated.
Have you actually created an app on https://appengine.google.com?! You need to do that first, then your app.yaml should contain the appid that you have created i.e. application: mcdougaltextspeak & not what it is in the tutorial.
After you've edited the app as you want, you must then deploy the app to the Google App Engine Servers (refer to the GUI deploy). You would get detailed logs when deploying, which would tell if the deployment was successful or not.
After deploying, you can then goto https://mcdougaltextspeak.appspot.com & play around with your online app. If you still get errors, check https://appengine.google.com/dashboard?&app_id=mcdougaltextspeak for the logs & report them here.