How to print the library project log in android?

I have one android project in which I have included 3 other Android library projects and I am using eclipse. I tried to print the magazine from the library project, but it only prints the magazine of the main project.

So can any body tell me how to print a library project journal, which is included in the main project?

My main project is com.project1.app , which I wrote to as shown below.

 Log.i(TAG,"Log From Main Project1"); 

The com.subLibrary.subLibraryapp library project that I registered with, as shown below.

 Log.i(TAG,"Log From Main Library Project"); 

But in LogCat, I can only see the log with com.project1.app , as shown below.

 com.project1.app | Log From Main Project1 

I made a mistake or need to open any other window. Can anyone suggest me?

+6
source share
2 answers

I assume your application and library have different tags.

If you use the command line to read the logs, you need to do something like

 adb logcat -s yourtag:V librarytag:V 

If you use Eclipse to read logcat output, try creating a filter specific to your application.

+1
source

Here is one of the simplest libraries I published a few days ago. Unlike a regular log library, you can work with only one message parameter. Itll print you the LINE number and the name METHOD.

One of the best things is that you don’t need to delete logs when in the release build. Follow these simple steps.

Step 1: add jitpack to gradle root level,

 allprojects { repositories { maven { url 'https://jitpack.io' } } } 

Step 2: Then just import

 dependencies { compile 'com.github.sujay219:LogHere:1.0.10' } 

Step 3: Initialization and Use,

 // Initialise in your main activity LogHere.initialize(BuildConfig.DEBUG, LogHere.ERROR, "wildox"); // Logging line, single param LogHere.e("this is message"); 

For more details

https://github.com/sujay219/LogHere

0
source

All Articles