Is there any way to print file line number with android Log ?
To gather logs (logcat) from an android phone, follow either one of the following processes. Install Android SDK from http://developer.android.com/sdk/index.html. Make sure platform-tools is included (http://developer.android.com/sdk/installing/adding-packages.html). Enable USB Debugging on your device.
for getting line number `
public static int getLineNumber() {
return Thread.currentThread().getStackTrace()[2].getLineNumber();
}
or
Thread.currentThread().getStackTrace()[2].getLineNumber()
in Log()
` try it will help u....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With