Message rendering is done prior to serialization. After serialization calling getMessage and getRenderedMessage always give the same result regardless of how you configure the server (receiving) side. Object rendering should be configured on the clients. HTH,


At 09:31 20.11.2002 +0000, FLYNN, Peter -Syntegra UK wrote:
Hi,

Here is my configuration (in XML) of my JMS Appender:

<appender name="JMS" class="org.apache.log4j.net.JMSAppender">
   <param name="TopicConnectionFactoryBindingName"
value="cn=LoggingTopicConnectionFactory"/>
   <param name="TopicBindingName" value="cn=LoggingTopic"/>
   <param name="Threshold" value="DEBUG"/>
   <layout class="org.apache.log4j.PatternLayout">
     <param name="ConversionPattern" value="[%-5p] [%d{DATE}] [%C.%M] -
%m%n"/>
   </layout>
</appender>

As you can see I'm using PatternLayout.  The message is sent out onto JMS as
a serialised java object (org.apache.log4j.spi.LoggingEvent) wrapped in an
javax.jms.ObjectMessage.

On the class org.apache.log4j.spi.LoggingEvent, I can use methods
getMessage() and getRenderedMessage().

Both return the %m message string, but I would expect getRenderedMessage()
to return the rendered message as defined in the layout in the
configuration.

Is this a bug, as the message should have been rendered before sending the
message out on the JMS appender?

Regards,
Peter
--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to