Log4j-在Log4j.properties中配置AsyncAppender

Log4j-在Log4j.properties中配置AsyncAppender,log4j,Log4j,我在log4j.xml中看到了大量关于如何使用AsyncAppender的资料。但是,我不能使用xml配置,因为我使用的是Jboss Fuse,而且这种技术只允许.properties配置 有没有办法将以下配置转换为.properties <appender name="async" class="org.apache.log4j.AsyncAppender"> <param name="BufferSize" value="500"/> <appender

我在log4j.xml中看到了大量关于如何使用AsyncAppender的资料。但是,我不能使用xml配置,因为我使用的是Jboss Fuse,而且这种技术只允许.properties配置

有没有办法将以下配置转换为.properties

<appender name="async" class="org.apache.log4j.AsyncAppender">
  <param name="BufferSize" value="500"/>
  <appender-ref ref="console"/>
</appender>

根据文档,这在property configurer中是不可能的:

但是,由于我使用的是Jboss Fuse,而Jboss Fuse使用的是ops4j pax日志记录,所以已经解决了这个问题,并且提交了配置

log4j.appender.async.appenders=console

是否在Jboss Fuse中工作这是否意味着AsyncAppender需要XML配置?.xml和.properties是否可以共存?是的,AFAIK AsyncAppender需要xml配置。在我的例子中,我使用的是ops4j日志记录(与Jboss Fuse捆绑在一起),因此我能够使用回答中描述的ops4j功能,使用属性配置来解决这个问题。谢谢
log4j.appender.async.appenders=console