AmqpAppender extends AppenderBase<ILoggingEvent> { public void setUseLevelAsKey(final boolean useLevelAsKey) { this.useLevelAsKey = useLevelAsKey; }  @Override void start(); @Override void stop(); void setUsername(final String username); void setPassword(final String password); void setVirtualHost(final String virtualHost); void setHost(final String host); void setPort(final int port); void setExchange(final String exchange); void setKey(final String key); void setUseLevelAsKey(final boolean useLevelAsKey); void setUseLevelAsPriority(final boolean useLevelAsPriority); void setContentType(final String contentType); void setEncoding(final String encoding); void setPersistent(boolean persistent); @Override String toString();  }
@Test public void testUseLevelAsKey() throws IOException { this.channel.queueUnbind(QUEUE, EXCHANGE, KEY); this.channel.queueBind(QUEUE, EXCHANGE, "ERROR"); final AmqpAppender appender = createAppenderWithInlineConfiguration(); appender.setUseLevelAsKey(true); createLogger(appender).error(this.message); }