I'm trying to use the AmqpAppender to log to a RabbitMQ exchange from a trivial spring boot application. I have a topic exchange "demo.log" defined and a queue bound to it with "#" as the routing key. I don't seem to be getting any messages to RabbitMQ using the logbook-spring.xml file below. Can someone please point out what I'm missing here?
Thanks!
--john
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <include resource="org/springframework/boot/logging/logback/base.xml" />
  <appender name="amqp" class="org.springframework.amqp.rabbit.logback.AmqpAppender">
    <host>localhost</host>
    <port>5672</port>
    <virtualHost>/</virtualHost>
    <username>guest</username>
    <password>guest</password>
    <exchangeType>topic</exchangeType>
    <exchangeName>demo.log</exchangeName>
    <applicationId>demo</applicationId>
    <routingKeyPattern>test</routingKeyPattern>
    <contentType>text/plain</contentType>
    <maxSenderRetries>2</maxSenderRetries>
  </appender> 
  <logger name="com.example" level="DEBUG">
    <appender-ref ref="amqp"/>
  </logger>
</configuration>
				
                        
You need a
<layout/>and<charset/>(used to convertStringtobyte[]) ...I have opened a JIRA Issue to give some diagnostics when these are missing.