You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by raulvk <ra...@gmail.com> on 2008/03/26 14:05:34 UTC

Logging of the activity of Service Units

Hi everyone,

This question is about logging facilities in ServiceMix. I am aware that
ServiceMix writes to a logfile under the log directory. However, is there
any mechanism in ServiceMix to set up logging of the activity of individual
components? I would be interested in having each service unit write their
own log file in a specific designated directory.

Ideally, they would register all events & messages that they receive,
indicating the result of the operations and the reply in In-Out MEP
escenarios.

Thanks a lot,

Raul.
-- 
View this message in context: http://www.nabble.com/Logging-of-the-activity-of-Service-Units-tp16300804s12049p16300804.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Logging of the activity of Service Units

Posted by mattrpav <ma...@airband.com>.
Raul-

It sounds like you would want to implement an Message Exchange Listener. 
All messages that flow through the system would be handed to the exchange
listener.  

Implement this interface:
org.apache.servicemix.jbi.event.ExchangeListener

Add it to the ServiceMix classpath:
 /lib (or create a new folder and add the folder to the servicemix.conf
file)

Add this to the servicemix.xml config file... any where as a child of the
parent <beans> tag:

    <sm:listeners>
       <bean class="com.yourcompany.servicemix..StatusListener"/>
    </sm:listeners>

* Must use fully qualified class name

Matt Pavlovich

-- 
View this message in context: http://www.nabble.com/Logging-of-the-activity-of-Service-Units-tp16300804s12049p16302201.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.