The JMS and Socket appenders in Logback do not allow you to specify an encoder. If you want to do that you need to add a getter and setter for that to your version of the JMSQueueAppender. However, if you really want a String instead of a byte array you can just as easily use a Layout instead of an encoder.<div>
<br></div><div>Ralph<br><div><br></div><div><br><div class="gmail_quote">On Thu, Nov 17, 2011 at 11:33 AM, Steve Cohen <span dir="ltr"><<a href="mailto:scohen@javactivity.org">scohen@javactivity.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">We have this configuration<br>
<br>
<configuration><br>
...<br>
<conversionRule conversionWord="ourcaller"<br>
        converterClass="com.whatever.<u></u>CallerDataConverter" /><br>
<br>
<appender name="jms" class="com.whatever.<u></u>JMSQueueAppender"><br>
<encoder><br>
<pattern>%d %-5p [%t] %ourcaller{1} - %m%n</pattern><br>
</encoder><br>
</appender><br>
<br>
<appender name="stdout" class="ch.qos.logback.core.<u></u>ConsoleAppender"><br>
<encoder><br>
<pattern>%d %-5p [%t] %ourcaller{1} %n - %m%n</pattern><br>
</encoder><br>
</appender><br>
...<br>
==============================<u></u>========<br>
<br>
This configuration produces these errors:<br>
<br>
3:21:43,935 |-ERROR in ch.qos.logback.core.joran.spi.<u></u>Interpreter@18:14 - no applicable action for [encoder], current pattern is [[configuration][appender][<u></u>encoder]]<br>
13:21:43,935 |-ERROR in ch.qos.logback.core.joran.spi.<u></u>Interpreter@19:16 - no applicable action for [pattern], current pattern is [[configuration][appender][<u></u>encoder][pattern]]<br>
<br>
The line numbers here refer to the JMSQueueAppender.  The console appender which is structured basically identically has no such problem.<br>
<br>
What is Joran trying to tell me here.  It appears to be telling me the pattern I am using, but does not tell me why it finds this objectionable.<br>
<br>
Thanks.<br>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a><br>
</blockquote></div><br></div></div>