0

I am facing a problem regarding putting my custom log file into the android application path and explore it.

Problem statement:

I have one android application which is using several custom java components(.jars) and there is one Logger component which is also a pure java component. So android application, as well as all pure java components, should use the custom logger to log all data. Now the problem is when I add the logger in android project and trying to create the log file in application path it's creating somewhere inside /data/data/package_name/files location but unable to explore this location and one more problem is custom logger is using one XML file which is nothing but rules defined for the logger and this file is there in logger's application path but when I tried to run through android and calling logger it seems like this resource XML file is not found.

So does anyone having some ideas about how to use logger in this scenario OR where to log my custom log file and where to keep my resource XML file which will be used by logger?

Does all of custom java components which will be used by the android application also refer the same path(Android app path) for logging the data???

Any help will be appreciated.

Thanks, Piks.

Swati Garg
  • 995
  • 1
  • 10
  • 21
piks
  • 1,621
  • 8
  • 32
  • 59

1 Answers1

0

As u are logging logs in applications directory, u must have root access. If u have root access Run this command on command prompt to copy it to ur devlopment machine. adb shell

su

pull

where remote is /data/data/package_name/files. Refer this: http://developer.android.com/guide/developing/tools/adb.html

If u dont have root access then log data to place where user level read and write access is present. Where u can create a folder,to make it simple.

Rohit
  • 593
  • 2
  • 8