0

我正在使用 Oracle MAF 进行移动应用程序开发。我知道,当我们部署到 Android 设备时,日志文件会生成到设备文件路径中。我也正在登录设备。

但是当我们部署Oracle MAFAndroid emulator我可以找到应用程序日志的地方时。我有我的默认记录器文件 ( Dalvik Logger Mechanism),附在下面供您参考。

日志记录属性

# default all loggers to use the ConsoleHandler
.handlers=java.util.logging.ConsoleHandler
# default all loggers to use the SimpleFormatter
.formatter=java.util.logging.SimpleFormatter
# default ConsoleHandler logging level to SEVERE
oracle.adfmf.util.logging.ConsoleHandler.level=SEVERE

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=SEVERE

#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=SEVERE

模拟器设置:

在此处输入图像描述

安卓模拟器:

在此处输入图像描述

如果您想了解更多关于此的详细信息,请告诉我。

4

1 回答 1

0

对于安卓模拟器:

输出被转发到与应用程序同名的文本文件。输出文件位置是 /sdcard。如果此位置不存在或配置为只读,则日志输出将重新路由到应用程序的可写数据目录。来源:http ://docs.oracle.com/middleware/mobile200/mobile/develop-oepe/oepe-maf-debug-test.htm#BABCBIHI (22.4 使用和配置日志记录)

对于 iOS 模拟器:

根据您使用的 Oracle MAF 版本,您应该能够将日志文件重定向到选择的位置(从 2.1 开始)。

这可以通过添加一些应用程序参数来归档:在您的应用程序上,选择运行 >>> 选择活动运行配置 >>> 管理运行配置,您应该在其中添加以下参数-consoleRedirect=<your location/logFile.txt>

于 2015-09-30T07:38:29.443 回答