log4j.properties 文件中的 AsyncAppender

AsyncAppender in log4j.properties file

我遇到了一些问题,虽然我已经搜索了答案,但还是找不到。

为了使用 AsyncAppender,我看到了很多不同的 log4j 配置,无论如何,其中 none 与 .properties 配置文件有关。

我自己尝试了不同的配置,但在尝试将 asyncAppender 与 SocketAppender 一起使用时完全没有成功。

A​​syncAppender可以在.properties文件上配置吗,还是需要code/xml配置?

提前致谢!

答案是:不能,无法通过属性文件进行配置。

AsyncAppender 需要通过code/xml配置。

: )