1 Reply Latest reply on Jul 12, 2013 7:05 AM by jasonnh

    How to set log level during fabric:container-create-child

    jasonnh

      Hi,

       

      After a fabric:container-create-child I can set the log level by e.g.:

       

      log:set TRACE org.ops4j.pax.url.mvn.internal.Connection

       

      But does anybody know how to set the log level while the container is being created?

       

      I have tried things like:

      profile-edit --pid org.ops4j.pax.logging/log4j.logger.org.ops4j.pax.url.mvn.internal.Connection=TRACE proflie1

       

      And then using profile1 in the container-create-child but that does not work.

       

      Any ideas much appreciated.

       

      Thanks.

        • 1. Re: How to set log level during fabric:container-create-child
          jasonnh

          After looking at the code for:

           

          org.apache.karaf.admin.internal.AdminServiceImpl.createInstance(String, InstanceSettings)

           

          It looks like you can not do it via a fabric command (someone please correct me if that is wrong!)

           

          A workaround seems to be to create the instances//etc/org.ops4j.pax.logging.cfg file and parent folders before the container is created and configure logging in there.  Then run container-create-child which does not override that file if it is present.