This discussion is archived
4 Replies Latest reply: Feb 22, 2013 12:18 AM by Frank Nimphius RSS

ADF Mobile: Logging

Bijesh Krishnadas Journeyer
Currently Being Moderated
JDeveloper 11.1.2.3.0 : Build: JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1
Deployed to Android Emulator: Android 4.0.3 (API Level 15) - ARM

I am having trouble working out the documentation on logging - [http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/debugging.htm#BABCBIHI] . From how I read the doco states that in Android, the console output is redirected to a text file in /sdcard. I have checked that /sdcard in my emulator has rw permissions. However, even on an error in the app, there are no log files generated.

The doco states that logging.properties should be in .adf/META-INF but by default JDev generates a logging.properties in src/META-INF. I have edited both logging.properties to set the log level to FINEST. Note: at the moment, I am merely trying to see the stacktrace for a framework generated exception.
# default all loggers to use the ConsoleHandler
.handlers=com.sun.util.logging.ConsoleHandler
# default all loggers to use the SimpleFormatter
.formatter=com.sun.util.logging.SimpleFormatter
# default ConsoleHandler logging level to SEVERE
oracle.adfmf.util.logging.ConsoleHandler.level=FINEST

oracle.adfmf.util.logging.ConsoleHandler.formatter=oracle.adfmf.util.logging.PatternFormatter
oracle.adfmf.util.logging.PatternFormatter.pattern=[%LEVEL% - %LOGGER% - %CLASS% - %METHOD%] %MESSAGE%

#configure the framework logger to only use the adfmf ConsoleHandler
oracle.adfmf.framework.useParentHandlers=false
oracle.adfmf.framework.handlers=oracle.adfmf.util.logging.ConsoleHandler
oracle.adfmf.framework.level=FINEST

#configure the application logger to only use the adfmf ConsoleHandler
oracle.adfmf.application.useParentHandlers=false
oracle.adfmf.application.handlers=oracle.adfmf.util.logging.ConsoleHandler
oracle.adfmf.application.level=FINEST
What I am trying to work out is do I have to use a FileHandler explicitly or is the doco right in stating that all console output gets written to /sdcard?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points