You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sophia Wright <so...@gmail.com> on 2013/11/07 16:10:51 UTC
Logging a message for Multi kahaDB
Hi,
I am using multi kahaDb in my broker. I am filtering kahadb files for some
destinations and rest other are going to the default folder.
I want to log for each message that in which Kahadb folder it is going. Is
there a way to log this information ?
Thanks,
Sophia
--
View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Logging a message for Multi kahaDB
Posted by Gary Tully <ga...@gmail.com>.
darn formatting. I pushed that change, so you can see the mapping with:
log4j.logger.org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter=DEBUG
https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=blobdiff;f=activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java;h=d10c4eb9d8fa11d41ff7ee37f9a2998a2db5ff6d;hp=c8fe75bf60163ad7b6a7d4f6ac09551f55aa8d60;hb=ff593bf3;hpb=c60af641653d69a0a7fce6088f2954f41b204a0a
On 15 November 2013 11:17, Gary Tully <ga...@gmail.com> wrote:
> you need a little enhancement to add some logging to the choice of
> adapter on a per destination basis. The choice is made when the
> destination is created. A mod to
> org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter#getMatchingPersistenceAdapter
> something like:
>
> git diff activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
>
> diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
> b/activ
>
> index c8fe75b..d10c4eb 100644
>
> --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
>
> +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
>
> @@ -171,6 +171,7 @@ public class MultiKahaDBPersistenceAdapter extends
> LockableServiceSupport implem
>
> }
>
> }
>
> startAdapter(filteredAdapter.getPersistenceAdapter(),
> destination.getQualifiedName());
>
> + LOG.debug("destination {} matched persistence adapter {}",
> new Object[]{destination.getQualifiedName(), filteredAda
>
> return filteredAdapter.getPersistenceAdapter();
>
> }
>
>
>
> On 15 November 2013 08:53, Sophia Wright <so...@gmail.com> wrote:
>> I tried enabling DEBUG level logging but it is not logging for destinations
>> in persistence store. I want to log for messages, which persistence store
>> they are going into.
>>
>>
>>
>> --
>> View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674524.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>
> --
> http://redhat.com
> http://blog.garytully.com
--
http://redhat.com
http://blog.garytully.com
Re: Logging a message for Multi kahaDB
Posted by Gary Tully <ga...@gmail.com>.
you need a little enhancement to add some logging to the choice of
adapter on a per destination basis. The choice is made when the
destination is created. A mod to
org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter#getMatchingPersistenceAdapter
something like:
git diff activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
b/activ
index c8fe75b..d10c4eb 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
@@ -171,6 +171,7 @@ public class MultiKahaDBPersistenceAdapter extends
LockableServiceSupport implem
}
}
startAdapter(filteredAdapter.getPersistenceAdapter(),
destination.getQualifiedName());
+ LOG.debug("destination {} matched persistence adapter {}",
new Object[]{destination.getQualifiedName(), filteredAda
return filteredAdapter.getPersistenceAdapter();
}
On 15 November 2013 08:53, Sophia Wright <so...@gmail.com> wrote:
> I tried enabling DEBUG level logging but it is not logging for destinations
> in persistence store. I want to log for messages, which persistence store
> they are going into.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674524.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
http://redhat.com
http://blog.garytully.com
Re: Logging a message for Multi kahaDB
Posted by Sophia Wright <so...@gmail.com>.
I tried enabling DEBUG level logging but it is not logging for destinations
in persistence store. I want to log for messages, which persistence store
they are going into.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674524.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Logging a message for Multi kahaDB
Posted by Christian Posta <ch...@gmail.com>.
Have you tried turning the log level to debug?
I'm not sure, but why would you even want to do this?
On Wednesday, November 13, 2013, Sophia Wright wrote:
> waiting for a response...
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674317.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Re: Logging a message for Multi kahaDB
Posted by Sophia Wright <so...@gmail.com>.
waiting for a response...
--
View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674317.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Logging a message for Multi kahaDB
Posted by Steven Turner <st...@gmail.com>.
I also have the same requirement. Is there a way to log for each message,
which store file it goes into ?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674208.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Logging a message for Multi kahaDB
Posted by Sophia Wright <so...@gmail.com>.
Hey, can someone help me here..
I want to log the store file where a message is going in case of Multi
kahaDB
--
View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674168.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Logging a message for Multi kahaDB
Posted by Sophia Wright <so...@gmail.com>.
Hey, Sorry about not writing the clear question.
Yes !! For each message that comes in to the broker, I want to log which
store file it goes in to ?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011p4674065.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Logging a message for Multi kahaDB
Posted by Christian Posta <ch...@gmail.com>.
Not sure what you mean. For each message that comes in to the broker,
you want to log which store file it goes in to?
On Thu, Nov 7, 2013 at 8:10 AM, Sophia Wright <so...@gmail.com> wrote:
> Hi,
> I am using multi kahaDb in my broker. I am filtering kahadb files for some
> destinations and rest other are going to the default folder.
>
> I want to log for each message that in which Kahadb folder it is going. Is
> there a way to log this information ?
>
> Thanks,
> Sophia
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Logging-a-message-for-Multi-kahaDB-tp4674011.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta