Shay Shmeltzer's Oracle Development Tools Tips

ADF Mobile Logging on Android

Shay Shmeltzer
Director of Product Management - Oracle

I posted before on how to do code level debugging in your ADF Mobile application, but sometimes debugging is an overhead and you would rather just put out some log messages that will allow you to track what's going on where.

ADF Mobile has built in support for a logging framework and it is documented in this chapter in the ADF Mobile Developer Guide.

You can use a line of code like this in your code:

Logger.getLogger(Utility.APP_LOGNAME).logp(Level.INFO, this.getClass().getName(), "Shay","We invoked the button");

Then don't forget to set the right level of logging (and possibly the log message format) in the logging.properties file under your META-INF directory.

The logging chapter in the doc, doesn't mention where to actually see the messages being logged.

One utility that you can use to see your log messages comes with the Android SDK - look into the tools directory there and you'll find the ddms.bat file - run it and you'll be able to see the log messages from your application.

On the side of that utility you can also define filters to just show you the messages you are interested in.

Here is a quick demo showing how this all works together:

By the way - a comment I got pointed out that ddms is old school and you should be using the new monitor.bat at the same locaiton. This will basically work just the same and will look like this:

 More tips on debugging and logging in this blog entry by Joe

Join the discussion

Comments ( 3 )
  • guest Friday, May 17, 2013

    liked ur post very much its very informative and useful. Thanks for sharing it with us....:)

  • guest Tuesday, May 20, 2014

    It's very useful for me .Thanks for sharing I want to implement the drag and drop functionality.Here I have a listview in that list-view i have list-item I want to Drag this list item from one place to another place can you please help me for implementing this.

  • guest Monday, October 24, 2016

    Great article shared by you. Really i don’t know about this information before read this article. Thanks for Sharing ..!!

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.