Uploaded image for project: 'ServiceMix 4'
  1. ServiceMix 4
  2. SMX4-1205

Provide a Pax JMS Appender to log info using ActiveMQ on Karaf/ServiceMix/Fuse ESB

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Until now, this is quite complex to configure a JMS log4j appender with Ops4j Pax Logging service. Procedure requires that we create a fragment bundle (http://karaf.apache.org/manual/2.2.8/users-guide/logging-system.html).
      An alternative and better solution is to create a JMSAppender implementing the PaxAppender interface and uses OSGI service to register it with the list of appenders available for Pax Logging.

        Activity

        Hide
        cmoulliard Charles Moulliard added a comment - - edited

        Procedure to install the OSGI Pax JMS Appender
        1) Compile project --> mvn install
        2) Create the file org.apache.servicemix.logging.cfg under $

        {karaf.home}

        /etc directory and add entry destinationName=logTopic
        3) Start Fuse ESB server (4.4.1-xx-yy) or ServiceMix
        4) install bundle --> install -s mvn:org.apache.servicemix.logging/pax-jms-appender/4.4.3-SNAPSHOT
        5) Modify org.ops4j.pax.logging.cfg
        log4j.rootLogger=INFO, out, osgi:VmLogAppender, osgi:JMSLogAppender
        Be sure that ActiveMQ messages are not logged to 'jms' appender
        log4j.logger.org.apache.activemq=INFO, stdout
        log4j.logger.org.apache.activemq.karaf.logging = INFO, stdout
        6) Check the topic logTopic

        Show
        cmoulliard Charles Moulliard added a comment - - edited Procedure to install the OSGI Pax JMS Appender 1) Compile project --> mvn install 2) Create the file org.apache.servicemix.logging.cfg under $ {karaf.home} /etc directory and add entry destinationName=logTopic 3) Start Fuse ESB server (4.4.1-xx-yy) or ServiceMix 4) install bundle --> install -s mvn:org.apache.servicemix.logging/pax-jms-appender/4.4.3-SNAPSHOT 5) Modify org.ops4j.pax.logging.cfg log4j.rootLogger=INFO, out, osgi:VmLogAppender, osgi:JMSLogAppender Be sure that ActiveMQ messages are not logged to 'jms' appender log4j.logger.org.apache.activemq=INFO, stdout log4j.logger.org.apache.activemq.karaf.logging = INFO, stdout 6) Check the topic logTopic
        Hide
        cmoulliard Charles Moulliard added a comment -

        Code committed

        Show
        cmoulliard Charles Moulliard added a comment - Code committed

          People

          • Assignee:
            Unassigned
            Reporter:
            cmoulliard Charles Moulliard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development