You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Aristotle B. Allen" <ar...@synchronoss.com> on 2004/04/14 15:06:19 UTC

null pattern with JMSAppender

I'm trying to use the JMSAppender for distributed logging, however I
need classname, method, and line_num in my message, because the remote
system where the JMSappender re-logs the message does not appear to be
to have the objects necessary to get that information.  

I have attempted to use a layout, but it is not being applied, in fact
the Layout for the LoggingEvent is null?

How can I force the JMSAppender to apply this pattern before it creates
the ObjectMessage and puts it on my topic?

Here is my config 

log4j.appender.JMSAppender=org.apache.log4j.net.JMSAppender
log4j.appender.JMSAppender.InitialContextFactoryName=weblogic.jndi.WLInitialContextFactory
log4j.appender.JMSAppender.ProviderURL=t3://localhost:7001
log4j.appender.JMSAppender.TopicConnectionFactoryBindingName=LoggingConnectionFactory
log4j.appender.JMSAppender.TopicBindingName=LoggingTopic
log4j.appender.JMSAppender.UserName=system
log4j.appender.JMSAppender.password=security
log4j.appender.JMSAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.JMSAppender.layout.ConversionPattern=(%C:%M:%L) - %m%n

-- 
Aristotle B. Allen
Sr. Engineer
Synchronoss Technologies Inc.
610.814.5598

perl -e 'print 
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: null pattern with JMSAppender

Posted by Ceki Gülcü <no...@qos.ch>.
Aristotle,

JMSAppender does not need a layout. To achieve what you have in mind,
simply set the LocationInfo property of the JMSAppender.

HTH,

At 03:06 PM 4/14/2004, Aristotle B. Allen wrote:
>I'm trying to use the JMSAppender for distributed logging, however I
>need classname, method, and line_num in my message, because the remote
>system where the JMSappender re-logs the message does not appear to be
>to have the objects necessary to get that information.
>
>I have attempted to use a layout, but it is not being applied, in fact
>the Layout for the LoggingEvent is null?
>
>How can I force the JMSAppender to apply this pattern before it creates
>the ObjectMessage and puts it on my topic?
>
>Here is my config
>
>log4j.appender.JMSAppender=org.apache.log4j.net.JMSAppender
>log4j.appender.JMSAppender.InitialContextFactoryName=weblogic.jndi.WLInitialContextFactory
>log4j.appender.JMSAppender.ProviderURL=t3://localhost:7001
>log4j.appender.JMSAppender.TopicConnectionFactoryBindingName=LoggingConnectionFactory
>log4j.appender.JMSAppender.TopicBindingName=LoggingTopic
>log4j.appender.JMSAppender.UserName=system
>log4j.appender.JMSAppender.password=security
>log4j.appender.JMSAppender.layout=org.apache.log4j.PatternLayout
>log4j.appender.JMSAppender.layout.ConversionPattern=(%C:%M:%L) - %m%n
>
>--
>Aristotle B. Allen
>Sr. Engineer
>Synchronoss Technologies Inc.
>610.814.5598

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org