4

For example, this file contains logging statements:

http://hi-android.info/src/android/webkit/CacheManager.java.html

Log.w() and such.

They do not seem to appear in LogMan output, even though the verbosity level is correct. Since this is system software, I suspect these loggings are disabled by default.

How it is possible to enable them in Android emulator? Is rebuild needed?

I am needing this info for debugging some caching problems with only occur with Android WebKit.

3
  • are you sure that execution runs through the line of code with Log.w()? This particular file has very few verbose logs and couple error (Log.e()) and warning (Log.w()) which means that log entries are expected only if something goes wrong.
    – Pavlonator
    Aug 11, 2011 at 17:01
  • oops, sorry, did not notice, this message is almost half year old:))
    – Pavlonator
    Aug 11, 2011 at 17:03
  • Well... I still don't know how to do it... Pavel :) Aug 11, 2011 at 18:33

1 Answer 1

0

here is the solution for this king of logging/tracing.

I assume you are using Eclipse and ADT. For command line the approach is similar. First lookup your process id(pid), then see LogCat for this pid with specified level.

Steps for Eclipse:

  1. start emulator, open app you are going to see the traces. in my example it is com.android.browser but you can use any application you want
  2. in Eclipse use Window -> Show View -> Other... -> Android -> Devices this will open the devices tool for Android and will show you the process list with their ids (pid)
  3. Find your process and remember it's pid. Let's say the pid is 293
  4. Open LogCat tool (Window -> Show View -> Other... -> Android -> LogCat)
  5. Press + (create a filter)
  6. enter filter name (My custom filter); leave "by Log Tag" blank; enter pid you remember into "by pid"; enter "by log level" (Verbose); press OK

this will create another tab in LogCat window and will show only the traces from this particular process you chose. Hope it helps.

1
  • unfortunately I think internal WEbKit traces are not available in LogCat which is why I asked the question Aug 13, 2011 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.