You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by BenXS <bx...@yahoo.co.uk> on 2010/03/03 10:58:14 UTC
Is it possible to log all inbound and outbound JMS msg (WITHOUT
Camel) ?
I would like to log the full XML JMS Header and the full XML payload
for all incoming and for all outgoing JMS Msgs.
The resp. XML content should be written to a logfile.
How can I achieve this?
I read several times the web page
http://activemq.apache.org/logging-interceptor.html
and played with some parameters but did not got it working.
I do NOT want to use Camel - just native, pure ActiveMQ Logging feature.
Is this possible at all?
Which parameters do I have to set EXACTLY in which config file to log the
JMS XML msgs content?
Ben
--
View this message in context: http://old.nabble.com/Is-it-possible-to-log-all-inbound-and-outbound-JMS-msg-%28WITHOUT-Camel%29---tp27766209p27766209.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Is it possible to log all inbound and outbound JMS msg (WITHOUT
Camel) ?
Posted by Gary Tully <ga...@gmail.com>.
the contents of the toString() depends on the message type, what message
type are you using?
I think for your use case you must add your own implementation. But look at
the source to be sure.
On 3 March 2010 12:05, BenXS <bx...@yahoo.co.uk> wrote:
>
> You say "you may" so it is not a must?
>
> From what you said I CAN log incoming XML JMS message but they are written
> as one long text line (as output from toString()) into the logfile?
>
> I enabled logging but NO XML message appears in logfile.
> So how else can I write the "toString()" info to logfile?
>
>
> Gary Tully wrote:
> >
> > To get access to the message content you may have to extend the
> > LoggingBrokerPlugin as it just logs the contents of the toString() on a
> > message, the contents of which varies with message type.
> >
> > It is a simple plugin so it is easy to extend to get it to do what you
> > want.
> >
> > have a look at the send method of
> >
> http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?view=markupto
> > see what it does.
> >
> > On 3 March 2010 09:58, BenXS <bx...@yahoo.co.uk> wrote:
> >
> >>
> >> I would like to log the full XML JMS Header and the full XML payload
> >> for all incoming and for all outgoing JMS Msgs.
> >> The resp. XML content should be written to a logfile.
> >>
> >> How can I achieve this?
> >>
> >> I read several times the web page
> >>
> >> http://activemq.apache.org/logging-interceptor.html
> >>
> >> and played with some parameters but did not got it working.
> >>
> >> I do NOT want to use Camel - just native, pure ActiveMQ Logging feature.
> >>
> >> Is this possible at all?
> >>
> >> Which parameters do I have to set EXACTLY in which config file to log
> the
> >> JMS XML msgs content?
> >>
> >> Ben
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Is-it-possible-to-log-all-inbound-and-outbound-JMS-msg-%28WITHOUT-Camel%29---tp27766209p27766209.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > http://blog.garytully.com
> >
> > Open Source Integration
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Is-it-possible-to-log-all-inbound-and-outbound-JMS-msg-%28WITHOUT-Camel%29---tp27766209p27767347.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
http://blog.garytully.com
Open Source Integration
http://fusesource.com
Re: Is it possible to log all inbound and outbound JMS msg (WITHOUT
Camel) ?
Posted by BenXS <bx...@yahoo.co.uk>.
You say "you may" so it is not a must?
>From what you said I CAN log incoming XML JMS message but they are written
as one long text line (as output from toString()) into the logfile?
I enabled logging but NO XML message appears in logfile.
So how else can I write the "toString()" info to logfile?
Gary Tully wrote:
>
> To get access to the message content you may have to extend the
> LoggingBrokerPlugin as it just logs the contents of the toString() on a
> message, the contents of which varies with message type.
>
> It is a simple plugin so it is easy to extend to get it to do what you
> want.
>
> have a look at the send method of
> http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?view=markupto
> see what it does.
>
> On 3 March 2010 09:58, BenXS <bx...@yahoo.co.uk> wrote:
>
>>
>> I would like to log the full XML JMS Header and the full XML payload
>> for all incoming and for all outgoing JMS Msgs.
>> The resp. XML content should be written to a logfile.
>>
>> How can I achieve this?
>>
>> I read several times the web page
>>
>> http://activemq.apache.org/logging-interceptor.html
>>
>> and played with some parameters but did not got it working.
>>
>> I do NOT want to use Camel - just native, pure ActiveMQ Logging feature.
>>
>> Is this possible at all?
>>
>> Which parameters do I have to set EXACTLY in which config file to log the
>> JMS XML msgs content?
>>
>> Ben
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Is-it-possible-to-log-all-inbound-and-outbound-JMS-msg-%28WITHOUT-Camel%29---tp27766209p27766209.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> http://blog.garytully.com
>
> Open Source Integration
> http://fusesource.com
>
>
--
View this message in context: http://old.nabble.com/Is-it-possible-to-log-all-inbound-and-outbound-JMS-msg-%28WITHOUT-Camel%29---tp27766209p27767347.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Is it possible to log all inbound and outbound JMS msg (WITHOUT
Camel) ?
Posted by Gary Tully <ga...@gmail.com>.
To get access to the message content you may have to extend the
LoggingBrokerPlugin as it just logs the contents of the toString() on a
message, the contents of which varies with message type.
It is a simple plugin so it is easy to extend to get it to do what you want.
have a look at the send method of
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?view=markupto
see what it does.
On 3 March 2010 09:58, BenXS <bx...@yahoo.co.uk> wrote:
>
> I would like to log the full XML JMS Header and the full XML payload
> for all incoming and for all outgoing JMS Msgs.
> The resp. XML content should be written to a logfile.
>
> How can I achieve this?
>
> I read several times the web page
>
> http://activemq.apache.org/logging-interceptor.html
>
> and played with some parameters but did not got it working.
>
> I do NOT want to use Camel - just native, pure ActiveMQ Logging feature.
>
> Is this possible at all?
>
> Which parameters do I have to set EXACTLY in which config file to log the
> JMS XML msgs content?
>
> Ben
>
> --
> View this message in context:
> http://old.nabble.com/Is-it-possible-to-log-all-inbound-and-outbound-JMS-msg-%28WITHOUT-Camel%29---tp27766209p27766209.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
http://blog.garytully.com
Open Source Integration
http://fusesource.com