我的问题是如何配置LOG4J2来写入RebbitMQ中的日志?可能吗 ? 我试过这个配置:
<RabbitMQ name="rabbitmq"
addresses="http://10.0.0.107:15672"
user="guest"
password="guest"
virtualHost="/"
exchange="log4j2Sample"
applicationId="log4j2SampleAppId"
routingKeyPattern="%X{applicationId}.%c.%p"
contentType="text/plain"
contentEncoding="UTF-8"
generateId="false"
deliveryMode="PERSISTENT"
charset="UTF-8"
senderPoolSize="3"
maxSenderRetries="5">
</RabbitMQ>
<Loggers>
<Logger name="org.springframework.amqp.samples.log4j2" level="debug" >
<AppenderRef ref="rabbitmq" />
</Logger>
<Root level="debug">
<AppenderRef ref="STDOUT" />
</Root>
</Loggers>
但我没有结果。