logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Rendered Message in JMSAppender messages
Date Wed, 20 Nov 2002 09:50:31 GMT
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:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message