我想了解如何在使用官方的 Apache Apex 中使用 log4j 查看应用程序日志RTS Test Sandbox in docker。更具体地说,我想知道 Apex 在容器内存储应用程序特定日志文件的位置。
我正在运行最新的官方 docker 映像,如下所述:https ://hub.docker.com/r/datatorrent/rts/
使用dtManage在http://localhost:9090/上运行,我成功上传了我的应用程序并启动了它。在Monitor选项卡中,我可以看到我的操作员正在接收和发送元组。当我单击蓝色按钮AM logs时,它会显示 3 个日志文件的下拉列表,即:
- AppMaster.sdterr
- AppMaster.stdout
- 顶点日志
当我打开并搜索所有 3 个文件的日志时,我可以看到很多来自 apex 的日志,但没有打印我的自定义应用程序日志。我的日志记录代码如下所示:
private static final Logger LOG = LoggerFactory.getLogger(Application.class);
LOG.info("helloworld");
在本地模式下运行应用程序时,我的所有日志都在控制台中可见。
在 properties.xml 中,我还启用了完整调试:
<property>
<name>dt.attr.DEBUG</name>
<value>true</value>
</property>
有人可以帮我吗?