4 Replies Latest reply on Jan 21, 2011 9:57 AM by Greg Davidson

    pax logging question

    Greg Davidson Newbie

      I have been trying to get my "application" bundle deployed in FUSE 4.3 to log to it's own file.

       

      My code:

      private static final Logger LOGGER = Logger.getLogger(WSService.class);

      public Object execute(Object part) {

      LOGGER.debug("Object type: "part.getClass().getName());+

      }

       

      My OSGI import:

      <Import-Package>

      ........

      org.apache.log4j;version="1.2.9";provider=paxlogging;mandatory:=provider

      </Import-Package>

       

      This file (org.ops4j.pax.logging.cfg) seems to be configured correctly:

      Sift appender

      log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender

      log4j.appender.sift.key=bundle.name

      log4j.appender.sift.default=servicemix

      log4j.appender.sift.appender=org.apache.log4j.FileAppender

      log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout

      log4j.appender.sift.appender.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c | %-32.32C %4L | %m%n

      log4j.appender.sift.appender.file=${karaf.data}/log/$
      {bundle.name
      }.log

      log4j.appender.sift.appender.append=true

       

       

      I have looked through the forum.  I have looked at all the links in the forum, including:

      http://fusesource.com/forums/thread.jspa?messageID=8547&#8547

      http://servicemix.396122.n5.nabble.com/OSGI-Bundle-log4j-td421030.html

       

      I know I must be missing something simple, but for whatever reason, my bundle's in not logging, at least I can't find it.

      Any help would be greatly appreciated.