我正在将EAR应用程序从 JBoss 6.1.0 AS 迁移到 Wildfly 8.2.0 AS 。 EAR包含 log4j.xml ,并使用以下代码行使用此日志记录配置文件生成应用程序日志:
org.apache.log4j.xml.DOMConfigurator.configureAndWatch(log4j文件路径)
应用程序日志生成正常,但在server.log中,应用程序日志也会被追加。我正在使用 standalone-full-ha.xml 配置文件并尝试以下步骤:
<deployment>
<exclude-subsystems>
<subsystem name="logging" />
</exclude-subsystems>
</deployment>
<subsystem xmlns="urn:jboss:domain:logging:2.0">
部分在 standalone-full-ha.xml 。
<use-deployment-logging-config value="true"/>
<add-logging-api-dependencies value="false"/>
如何防止应用程序日志附加到server.log中?请帮忙。
解决方法已尝试
只是添加到我以前的评论中,我尝试了链接http://www.mastertheboss.com/jboss-server/jboss-log/using-log4j-with-jboss-as-7-and-wildfly中提供的第一个选项。
在EAR的META-INF下添加了log4j.xml。
将org.apache.log4j模块添加为MANIFEST.MF中的依赖项属性之一。
有人提到添加VM参数-Dorg.jboss.as.logging.per-deployment = true但我没有添加。
server.log生成正常,应用程序日志生成正常,但我有以下问题:
是log4j.xml中的起始标记,它具有“warn”作为threshold属性的值。但是,我得到了所有类型的日志(即作为ALL或DEBUG阈值)。
我已将log4j.xml放在EAR的META-INF中。那么,org.apache.log4j.xml.DOMConfigurator.configureAndWatch(log4j文件路径)会在哪里工作,其中path表示META-INF中的log4j.xml?默认超时为60秒,如果我更改阈值,它是否会反映?
答案 0 :(得分:1)
我使用以下jboss-deployment-structure.xml:
>> help moviein
moviein Initialize movie frame memory.
moviein is no longer needed as of MATLAB Release 11 (5.3).
In previous revisions, pre-allocating a movie increased
performance, but there is no longer a need to pre-allocate
movies. To create a movie, use something like the
following example:
for j=1:n
plot_command
M(j) = getframe;
end
movie(M)
For code that is compatible with all versions of MATLAB,
including versions before Release 11 (5.3), use:
M = moviein(n);
for j=1:n
plot_command
M(:,j) = getframe;
end
movie(M)
See also movie, getframe.